6 ms·
Functional languages will rule (but not this year)
- T_S_ 15y agoIs the Haskell Singularity approaching? http://www.reddit.com/r/haskell/comments/hezgk/haskell_singularity_approaching/ http://www.reddit.com/r/haskell/comments/hezgk/haskell_singu...
- kjksf 15y agoThe article contradicts its own title. The author claims, in the title, that functional languages will rule, some day. Then he does a tour describing each would-be-ruler functional language (erlang, haskell, ocaml, F#, scala) and explicitly says that all of them will remain niche languages i.e. will not rule.
- harryh 15y agoHis thesis is that none of the current crop of functional languages will rule, but that some new functional language not yet invented (or widely known) will.
- ddkrone 15y agoI'm betting on javascript.
- gaius 15y agoA language can't come out of nowhere, because it won't have the critical mass of people, libraries, etc to be usable for "real work". IF a functional language is going to be mainstream in only 5 years, then there are a significant number of people using it today, and it will be generally known in the FP community. Even F# was a) in beta for years b) solved the library problem by piggybacking on C# and c) had a critical mass of OCaml users who could jump straight into it.
- ankrgyl 15y agoHis arguments about the existing functional languages can be roughly split into two categories: 1.) Languages refuse to make compromises and therefore are obscure (Haskell, Erlang) 2.) Languages are crippled by making too many compromises (F#, Scala). He presents good arguments about why both types of languages can't currently break into the mainstream, but it unfortunately seems like these options form a partition of the possibilities (i.e. a functional language must fall into one of the two). If this assumption is correct, then by his analysis no functional language can break into the mainstream. I'd love to see a discussion over whether or not that assumption is valid, but for now let's assume it's true. I don't think the languages are the problem. Instead, I think it's the general momentum and consensus of the community. Without books like Learn You a Haskell (http://learnyouahaskell.com/ http://learnyouahaskell.com/), Haskell would be an order of magnitude more difficult to begin learning. I'm still trying to figure it out, and there are a lot of examples of topics where a similarly good tutorial would ease my learning. Eventually, as the language gains popularity, more and more such work will exist. Furthermore, if popular companies demonstrates that it's a great choice, more people will want to pick it up. If all this stuff happens, our intuitions will grow and adapt to make such a language a natural choice. In summary, the future of functional languages depends more on our understanding and promoting them as a community, as opposed to the languages themselves.
- evangineer 15y agoYou make an excellent point about the primacy of the community. I can't remember where I first came across the idea that languages are communities, possibly Richard Gabriel's Patterns of Software. As someone about to embark on the Standard ML learning curve (motivated primarily by Ur/Web - Ur is a ML-like language), it is striking that the SML community is fragmented to the point of non-existence (not even a Planet SML, the sml-list is dead, & the SML subreddit is pretty lifeless). Looking at Alice ML which has significant advancements over both Objective and Standard ML, it has great features, but no momentum which isn't helped by the fact that there hasn't been a release since 2007.
- anon_d 15y agoLooking at Alice ML which has significantly more features than ... FTFY My favorite thing about SML is that it only has known-good features.
- cageface 15y agoThis is a refreshingly honest analysis from someone that has a lot of skin in the game. I completely agree on both points. First, the functional paradigm is important and a step forward for most problem domains. Second, none of the current crop of functional languages is going to truly break into the mainstream. I think it's more likely that we'll see more and more functional techniques trickle down into mainstream languages than it is that we'll see a pure functional language adopted as-is. C++ just picked up lambdas, after all. I do regret somewhat my dalliance with FP over the last decade though. If I'd invested that time in mastering DSP or graphics programming instead I'd be better off overall.
- evangineer 15y agoThere is a definite functional trickledown effect going on with mainstream languages. I have the suspicion that the breakthrough functional language will be like CoffeeScript in that it compiles down to Javascript taking advantage of the high performance Javascript runtimes and the functional core of Javascript.
- Homunculiheaded 15y agoIt's somewhat funny that this article seems to miss the very practical rise of functional programming style in JavaScript, especially with the rise of libraries like underscore.js Of course JavaScript has some pretty severe limitations as far as functional programming goes, the biggest being really cumbersome lambdas, and a lack of implicit return. If you try to program in a functional style in JavaScript you'll be fighting the language more than you'd like. However both of these issues are remedied in CoffeeScript. As someone who was a lisper before getting into web development I'm really surprised to see lambdas, closures, pattern matching/de-structuring bind, let statement equivalents and more be part of a language that is not even talked about too much as being lisp-like or functional. Also important is that CoffeeScript's main selling point is that it's practical and more sane then JavaScript, not that it's functional or lisp-like. At the same time CoffeeScript is probably the closest thing I've seen to a (potentially) successful lisp-without-parens Functional languages will gain serious traction, but I think it will be when their users find their features convenient and helpful (coffeeScript) rather than interesting/mind-blowing/etc (scala, haskell, erlang..)
- davidhollander 15y ago> Also important is that CoffeeScript's main selling point is that it's practical and more sane then JavaScript, not that it's functional or lisp-like. At the same time CoffeeScript is probably the closest thing I've seen to a (potentially) successful lisp-without-parens Have you tried Lua? It has full lexical scoping like Scheme (so you don't have to (function(){})() all over your code to create closures) and has saner built in types than vanilla JS, while also being much faster (around SBCL\Java speed with LuaJIT). I'm writing a basic functional library for it here if you need some stuff like map, foldl, foldr, partial, filter to get started: https://github.com/davidhollander/fn https://github.com/davidhollander/fn
- silentbicycle 15y agoUnfortunately, Lua has statement- rather than expression-oriented semantics (i.e., no "implicit returns"). It's quite nice otherwise, though, and its integration with C is hard to beat. I wrote a library for pattern-matching in Lua, btw (http://github.com/silentbicycle/tamale http://github.com/silentbicycle/tamale). May be of interest.
- patfla 15y agoAll the machinery of functional programming languages that's creeping into non-FP languages is great. I actually think that FP one-liners are usually _more_ transparent than the corresponding non-FP loop. However if I'm not mistaken an important point of FPLs was to eliminate side-effects and that the ultimate goal was program verification (not validation). I.e. you could prove a program correct in the mathematical sense. That seems still a long way off.
- evangineer 15y agoThe trend I'm seeing isn't towards verification by proof but leveraging the type system to ensure that the compiled program is correct and secure. Both Opa and Ur/Web take this line.
- smackay 15y agoSo how does the tooling problem get solved? This would seem to be the limiting factor presented in the article not necessarily how opinionated the language is.
- evangineer 15y agoTypeSafe have money in the bank and a serious commitment to fixing the Scala tooling for Eclipse.
- lurker19 15y agoMaybe 3rd time will be the charm.
- hugh4life 15y agoOne language he left out was Nemerle... I like it more than Scala... http://nemerle.org/About/ http://nemerle.org/About/ F# 3.0 will have type providers which provide functionality similar to Gosu's open type system. The Future of F#: Data and Services at your Finger Tips http://channel9.msdn.com/Events/PDC/PDC10/FT12 http://channel9.msdn.com/Events/PDC/PDC10/FT12 http://i51.tinypic.com/300chly.jpg http://i51.tinypic.com/300chly.jpg Not new, but Websharper for writing Javascript in F# is pretty cool... http://websharper.com/samples/WebGL http://websharper.com/samples/WebGL http://websharper.com/samples/Canvas http://websharper.com/samples/Canvas
- evangineer 15y agoNemerle's been around for years and I don't see it getting any traction, especially in the shadows of both C# which has been cherry picking functional features & F# which has the backing of Microsoft.
- gar1t 15y agoA power and persuasive essay on the essential merits of functional languages. Erlang is ugly Haskell is beautiful, like Karate OCaml is impenetrably unexciting F# is polished. And mainstream Scala is a tour de force of concepts. Tiobe Top 20
- evangineer 15y agoI wonder if the author would feel the same way about OCaml if he had come across it before Scala. I suspect not somehow.
- fhars 15y agoI came to scala because it is in fact an acceptable ocaml that runs on the JVM.
- evangineer 15y agoKind of my point. I think he's meh on Ocaml because Scala has the same features & runs on the JVM, seeing it after using Scala wouldn't be very exciting. However Ocaml was around years before Scala.
- mb21 15y agoscala is in the 50-100 range now according to http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
- gaius 15y agoIt's an interesting analogy. Whenever Karate fighters enter MMA contests, they get their arses handed to them by BJJ fighters - the beauty of their art doesn't translate into effectiveness in competition.
- ubojan 15y agoYes it does. It's hard to be a successful MMA fighter relying on just one martial art. Just look at Machida how he beautifully incorporates karate in MMA game.
- kumarshantanu 15y agoMention about Clojure (which is more functional than Scala) is curiously absent from the blog post.