4 ms·
you obviously know lisp and might be biased but i have a serious question, if i was going to waste a bunch of time learning a functional language in 2019 and wa
by misiti3780 8y ago
you obviously know lisp and might be biased but i have a serious question, if i was going to waste a bunch of time learning a functional language in 2019 and wanted to use it in production (I am in consulting, so I would be recommending this to my clients) would you learn
1. LISP
2. Haskell
3. Erlang
4. Something else
No wrong answer, just a question I always like to hear answers to.
- dmitriid 8y agoErlang as the most pragmatic functional programming language. Clojure as the most useful functional programming language. Ditch both if/when you run into their limitations. You’ll then discover various degrees of FP in most languages.
- h_r 8y agoI enjoyed Clojure and wrote a little production code using it but I'm finding F# much more fun and safer. F# is certainly far easier to refactor so that's another nice effect of having a static type system. Since .NET is so prevalent in business, it's easy to use almost anywhere.
- eropple 8y agoI like a lot of F# but there's a lot of F# Person stigma to it in most shops that I've seen--condescending, shitty, and in many ways perceived, validly or invalidly, "different-to-be-different" (the Paket brouhaha comes to mind). F# is a great language but I've found that it's usable when you can 1) convince C# people it's not that scary, and 2) convince them that you're not An F# Person.
- nicklaf 8y agoNot GP, but: I recommend Standard ML. I can't see a better way to do this than to power through Dan Grossman's three course sequence, which goes back to the drawing board and teaches Standard ML [0] to introduce modern programming language features such as scope, closures, types, pattern matching, modules, and so on. Then, he uses the concepts introduced in Standard ML as a springboard to introduce Scheme in the second course, and Ruby in the third course. And in the end, you will see how each of the three languages implement in different ways the same powerful techniques. But with just that first Standard ML course, you can already branch out to more popular languages such as Scala [1], which gives you the closest thing I've seen to "Standard ML on the JVM". But Standard ML (or Ocaml, which is very close) might even be your preferred language for prototyping [2], or compiler writing [3]. P.S.: To make Coursera tolerable, I usually pull the entire course with this nice little script [4]. Works great with ranger and mplayer! [0] https://www.coursera.org/learn/programming-languages https://www.coursera.org/learn/programming-languages [1] https://www.coursera.org/specializations/scala https://www.coursera.org/specializations/scala [2] https://sanderspies.github.io/slides/dawn-of-reason.pdf https://sanderspies.github.io/slides/dawn-of-reason.pdf [3] http://flint.cs.yale.edu/cs421/case-for-ml.html http://flint.cs.yale.edu/cs421/case-for-ml.html [4] https://pypi.org/project/coursera-dl/ https://pypi.org/project/coursera-dl/
- misiti3780 8y agothank you!
- nicklaf 8y agoCaveat emptor: Standard ML is not widely used in industry and does not have a large library ecosystem, so if you do recommend it to clients, make sure it's clear that they'd want to follow up with something like Scala or Ocaml, which have far more users/libraries. It's just that for really understanding functional programming, Standard ML is fantastically clear. (Although actually, that Scala coursera course I linked to above is by Martin Odersky, and is also pretty darn good, especially if you're already committed to the JVM.) Others have mentioned Elixir, which would also be an interesting option to explore. The main difference being that with Elixir you're leveraging Erlang and BEAM (which gives you a fantastic platform for actors and lightweight threads), versus Java and the JVM in the case of Scala (which gives you access to all of Java).
- HeWhoLurksLate 8y ago> Uses script to copy programming course. That's a little meta, don't you think?
- nicklaf 8y agoWelcome to Lisp: https://www.defmacro.org/ramblings/lisp.html https://www.defmacro.org/ramblings/lisp.html :-)
- nicklaf 8y agoI almost forgot to mention: Matt Might has an excellent blog post about what all of these "advanced" programming languages offer: http://matt.might.net/articles/best-programming-languages/ http://matt.might.net/articles/best-programming-languages/
- craigsmansion 8y agoProbably Erlang, but potentially Ocaml. I'll probably catch some flack for this (from both sides): You can (and should) use Ocaml as a Lisp where you lose the easy macros but gain strict typing. It's brilliant. The only downside is emacs; it's the only sensible IDE. Haskell (and friends) are fantastic, but in my experience you have to be reasonably smart and work full-time with it, since every medium sized project gets turned into its own DSL (more so than with other languages). Maybe it's not ideal for consulting.
- darpa_escapee 8y agoErlang has Elixir which is used throughout industry. Clojure is out there, too. I've also seen OCaml and Haskell here and there. F# is gaining ground.
- avinium 8y ago+1 for F# (though I have to admit, Elixir seems much preferred as the functional weapon of choice in industry). Amazing ML-derived language with all the benefits of the .NET ecosystem. Highly suggest everyone dip their toe in.
- lisper 8y agoI will always have a soft spot in my heart for Common Lisp, and Clozure Common Lisp (CCL) in particular. But all the cool kids seem to be using Clojure (with a J) nowadays.
- sedachv 8y ago> if i was going to waste a bunch of time learning Your problem is not what language to learn, your problem is that you think that learning is "wasting time." > a functional language in 2019 Lisp is not a functional language, so your question does not even make sense. If you actually want to help your clients, instead of selling them on bogus, inappropriate solutions (which, with your attitude and lack of knowledge, I guarantee is what you are doing to your clients today), you need to start actually learning the fundamentals of your field. If you think that learning is "wasting time," then you are not learning, you are, indeed, only "wasting time." I am also a consultant, have worked with all the languages you listed, and I say the above to help you, and other people who consult, and me. Consulting is all about having a very solid knowledge base, continuous learning, and professionalism (which, BTW, includes basic writing skills, like capitalization). Attitudes like yours are why consulting engagements fail, and why consultants get a bad reputation. That only makes it harder for all of us to get work.