60
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 12 Feb 2026
60 points (100.0% liked)
Learn Programming
2084 readers
81 users here now
Posting Etiquette
-
Ask the main part of your question in the title. This should be concise but informative.
-
Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.
-
Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.
-
Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 2 years ago
MODERATORS
If you’re looking for something fun to write you might want Ruby. Literally built from the ground up with developer satisfaction as the primary goal.
Very expressive, plenty powerful. Not my absolute personal favorite but I can’t deny it’s satisfying to use.
Haskell or Clojure (or Common Lisp) if you want something weird but neat as alternatives.
People calling functional programming weird hurts me. It's just unfamiliar not weird.
Weird is subjective. If you’ve only ever done C++ style object oriented programming then jumping into a lisp or a pure functional language is absolutely weird.
Whats the best functional programming language for a newbie?
The language thay you are already using! You need to understand FP, not a new language. Definitely read "Grokking simplicity" by Eric Normand.
But if you want to learn a new language more suited for FP, I would hardly recommend either guile scheme, racket, or clojure (all are lisps and you can use and build real word things with them forever). Haskell is also great but it's much harder than lisps.
You can do oop or fp with lisps, there is basically no syntax, you can get started and actually focusing on doing FP in a month. (Som say you can learn the language itself in a week, which you can but if you are really dedicating time to it).
What do you mean by 'FP'? I looked up 'FP meaning' and got 'foreign policy', which I don't think is what you mean here
Functional programming
I think Haskell would be a good choice. It's mature, used for real things (amongst a particular crowd, at least) and it's emphatic about being purely functional. Even when it is forced to enable other styles like imperative, it's done in a way that's syntactic sugar for a pure version (
donotation being a great example of this, it's really just a chain of lambdas). You can do functional style programming in a lot of languages now, but they'll also let you mix and match other styles, which can make it easy to "cheat." Haskell will teach you functional programming and that's it.Also, since it sounds like you're familiar with Rust, it uses a lot of ideas from Haskell. Rust enums are a clone of Haskell's algebraic data types, patterns are almost exactly the same, traits are typeclasses right down to the fact that the compiler can derive some common ones automatically, Rust strongly encourages immutability while Haskell basically requires it, and in both languages you're only allowed to break the rules if you start using things with the word
unsafein them. My experience learning Rust was "oh, C and Haskell had a baby named Rust, cool!" The big difference is that in Rust, you're programming from inside a C-style computer with RAM, while in Haskell you're programming in a mathematical void and the computer is tidily packed away in a box labeledIO.A fun guide for learning Haskell is here: https://learnyouahaskell.github.io/
Very interesting. Haskell definitely intrigues me. What's the learning curve like, I hear it can be a bit tricky?
It's very different. You have to come at problems in a very different way because the tools at your disposal are not what you're used to.
The language itself is quite elegant and simple, if you strip it down to its essence it's basically "when you see A on the left side of the equals sign, replace it with B on the right side of the equals sign" repeated until your program has either errored out or been boiled down to a single value. The type checker ensures that the replacement will be legal no matter what's happening at runtime, and can really help with getting things lined up just right because it's very thorough.
The simplicity also leads to complexity, though, for a few reasons. The solution to any problem is usually generalizable, since there's such a small surface area to the language itself and the type system allows for very abstract declarations of what a thing does, which leads to very beautiful solutions that are also so general and reusable that it can take work to figure out "okay, so this thing composes one function that is traveling recursively down the list of pairs, applying this function to the first item, and that's composed into this other function that is pulling them apart into separate lists..." whereas if it had been written the "dumb" way it'd be more like "oh, we're breaking these items into two lists and tweaking the first item as we go," unnecessarily tied to the one particular scenario and totally unusable anywhere else in your code, but also more readable and concrete. There's an entire vocabulary of functions that do abstract things that you have to learn to make sense of what's going on sometimes.
Related to that is monads, which are such a common pattern in Haskell that the language has special notation for them; they're an incredibly powerful tool for putting values in a context and/or creating an environment where background details can be handled out of sight, but they're also so generalizable that they span from the simplest monad that basically just captures "this thing might not actually exist" all the way to the IO monad which, in a way, represents the entire universe, or at least your entire computer. Learning Haskell means wrapping your mind around them, which isn't impossible, they're actually quite simple, basically just 2 functions that need to follow a few rules, but it takes a few examples and explainers to really get it.
Generally I think any programmer benefits from at least trying out something like Haskell, even if you never become an expert or use it day-to-day, it'll give you a new angle to think from and could spark thoughts you never would have had before.
For a newbie probably something like Scheme (which is just a particular flavor of LISP) although I wouldn't call it a good language.
Here's the thing with purely functional languages that don't allow in place mutation (most of them, or only under special circumstances like Haskell's ST Monad), they force you into learning functions that typically don't exist in other languages like foldl and force you to think about approaching problems in a different way. This will make you a better programmer even when working on other languages, but it's very much something you have to learn and like all learning it will take time and effort.
I'm actually tempted to say Haskell is the best option because it actually is a really good language but it's not so much a learning curve as it is a learning grand canyon. It has an amazingly powerful type system (very similar to Rusts) and uses it very well, but it's also very unintuitive because it's deeply rooted in academia and uses names for things taken from set theory and mathematics (terms like endofunctor, profunctor, affine space, and of course the famous Monad). If you're finding Rust a struggle Haskell would be 10 times worse for many of the same reasons.
Another maybe good option that I can't definitively recommend would be OCaml. I've heard really good things about it and what I've seen of it looked good, but I haven't personally used it beyond maybe a little reading and a hello world type thing so I'm unsure what kind of pitfalls a newbie might run into.
The primary reason I'd recommend Scheme is because it's in many ways a very primitive language. Its type system is very simple and it really doesn't have a lot going on other than being purely functional. That is also its biggest downside with its second biggest problem being a rather annoying syntax (be prepared to spend a lot of time counting parens to make sure you're closing every pair and working in the scope you think you are).
Thanks for your write-up. Haskell sounds interesting but a bit intimidating. I'm definitely intrigued by the functional programming thing though, I think that might be my next stop. Ruby seems interesting but I'm already familiar with JavaScript, which seems a bit similar to me, so it would be nice to shake things up a bit.
These are unique suggestions, which is a good thing, thank you.