“Which functional programming language should a beginning developer choose?” – tips from Reddit users

Recently, a user named HistoricalAccess9501 said that he was interested in functional programming, but did not know which language to start with:

A lot of people told me to learn Haskell, Scala, Clojure, Erlang or Lisp because they would help me understand functional programming well. But I’m not sure which one to tackle first. I have experience with Python and JS, but I have never encountered functional programming languages, so I also want to know which languages ​​are used for what: applications, websites, games, machine learning, and so on.

In response, HistoricalAccess9501 received some good advice.

UdPropheticCatgirl

I think any of Lisp’s descendants and dialects would work, such as SBCL or Clojure (and maybe Racket).

You can try Elixir, Erlang and Gleam, especially to understand BEAM. If you are familiar with actors and IPC. Scala is great, but it’s different from most functional languages, so it’s not worth learning first. I would also skip Haskell and learn OCaml instead.

Regarding areas of application:

  • Scala is used to build data pipelines and for backend in Java.
  • Clojure is the optimal Lisp for working in 2024, mainly if you write a backend in Java.
  • SBCL is rare today, I only came across it while working with HFT, it was also used a lot in AI at one point, but I’m not sure if it’s still used today.
  • Elixir is a backend again, especially if you work with distributed systems.
  • Erlang is the king of distributed systems, often used in telecom.
  • Haskell is only suitable if you have nothing to talk about with the courier and before the D&D game.
  • OCaml is used by about two fintech companies and some small analyzers in Meta, that’s all.

***

VicariousAthlete

F# is simply wonderful – my best experience in this area. Now we use it to create large-scale systems (online food ordering).

***

I waited

First, decide what concepts you want to learn, and then match the language to it. Don’t forget about the popularity of the language – a good community and a large set of tools will make learning easier.

  • First class functions, composite functions, etc.? — Javascript, Racket.
  • All of the above plus immutable objects? — Clojure.
  • All of the above plus a good type system? Typescript.
  • All of the above plus Hindley-Milner and maths? – Haskell

<...>

***

Joewoof

It’s hard to choose. The simplest and most popular is Scala, but it is a multi-paradigm language. Haskell is too rare. Something in between?

Probably OCaml. It is taught as a first at Cambridge and has a good reputation. If you want something more practical, then choose Elixir.

***

0xAERG

If you are familiar with JS and want something similar, I advise you to try learning ReScript. It is functional, compiles to JavaScript, and the syntax is similar to a mixture of OCalm and JS. <...>

***

davadds0

At university I studied Erlang and Scheme.

I recommend learning Erlang first (get good at vanilla Erlang first) and then OTP, something like an Erlang library/framework, it will save you from monotonous work. It will also be convenient to create complex distributed systems using Erlang/OTP. <...>

***

Peiple

One unusual thing is R, which is useful in practice. It is not as hardcore as Haskell, but contains most of the functional programming concepts. Mainly used in Data Science. <...>

***

Frenchslumbe

The easiest to learn is Lips.

Simple and consistent syntax (yet very expressive). In addition, having studied Lips, it will be easier with its dialects and descendant languages. <...>

I also recommend ClojureScript. This is a Clojure implementation, compiled to JavaScript.

What advice would you give to someone starting to learn functional programming?

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *