Ask HN: What is the future of programming languages?
It seems JS is getting really big lately, since everything is going to the web. But there must be something next that is just a leap different than everything going on right now.
Everything moves to be of higher abstraction to where it's more natural for humans to think and perhaps eventually it will be like writing an essay to get what you want [1].
But what will be after the current languages we see now? With more things relying on computers and people hoping more will get into computers, are there languages that could be made to encourage that?
I have a bunch of random thoughts but I am curious to hear what people that have been involved with computers longer than me think (and ones newer to computers think as well). My little time with prolog made me wish there were more declarative languages.
Any thoughts would be great! I am also kind of looking to see if anyone knows of any open source current programming languages that are trying to 'disrupt' the current way of doing things.
Thanks.
[1] http://blog.wolfram.com/2010/11/16/programming-with-natural-language-is-actually-going-to-work/
16 comments
[ 3.1 ms ] story [ 43.0 ms ] threadI hold the opposite view. Now that compilers are getting smart enough to do very good type inference, and the fact that tools are evolving, I believe strict, static typing will be the future.
The better the type system, the more runtime bugs you prevent from happening. While fighting against the compiler as a veteran programmer is a bit foreign (and makes you feel dumb), it's infinitely preferable than having to debug obscure production bugs.
Good compilers are like a massive suite of unit tests you get for free.
I also see the future of programming languages being functional in nature. Not because of the oft-repeated 'good for concurrency' misnomer (it's an orthogonal issue), but simply because it forces you to think a different way that ends up being more correct than imperative styles.
It takes me much longer (somewhat ashamed to admit) to write a functional library than an imperative one, however, I've been amazed at how well they've turned out and the reuse is much greater.
I think there's tremendous value in having server and client code being in the same language though. I think the future will have things like GWT for other languages as long as JS is what's being ran in the browser.
I'm not 100% certain what you are describing, but it sounds like using continuations.
I have made a gist which should illustrate it maybe a little better: https://gist.github.com/anonymous/24a43cd81843e79df52d
Perhaps you want even more access to environments elsewhere in the call stack; ISTR that there are languages now that allow that.
Of course, doing stuff like that makes it much harder to reason about your programs than treating functions as sealed boxes that communicate via arguments and return values, which is one (but not the only!) reason why most languages deliberately don't make it easy to do.
Normally this is used for producing very large lists in an on-demand manner, rather than precomputing, but it can be abused for some very unique things.
Also, by functional, I DONT mean just map/reduce/filter. The advantage of FP is really in being able to define types and mini DSLs very easily, the kinds of patterns higher order functions allow you to capture, the simplifications afforded by immutable types add up to make functional code the cleanest representation of the problem itself, without any of the cruft.
Try learning Scala, Clojure, or another functional language, and write some serious code in it. Go through a book or a course though, because if you try to pick it up by google and blog posts, you might end up writing basically imperative code in the language, which defeats the purpose.
Personally, writing functional code for the first time opened my eyes to how many problems that I thought were more or less fundamental were just artifacts of the level of abstraction being too low.
After a while of using paredit, I actually grew to rather like the parentheses. At the very least, it lets me edit in a slightly more semantic fashion: I can navigate, select and modify code based on its structure because the structure is defined by the parentheses.
That said, I actually do prefer not having nearly as many parentheses, which is why I like ML-style syntaxes. Especially Haskell. Idiomatic Haskell is very light on parentheses and braces and brackets--it's a surprisingly minimalistic syntax. I love it.
Also, only LISPs are parens heavy. Try something like SML or Scala if that turns you off.
Side note: I'm writing some Java code to practice for interviews.. I miss sum types so much. Another thing that FP got right.
I doubt it. You'll just be compiling JS (or a JS descendant) down to a quantum machine or DNA or who knows what. Change is incremental. People talk about the rapid pace of change in technology, but if you learned C in 1985 and no other language for 25 years, you'd not be very far behind right now.