52

I don't need something practical. I just need something fun to keep me motivated.

you are viewing a single comment's thread
view the rest of the comments
[-] chaos@beehaw.org 2 points 18 hours ago

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 (do notation 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 unsafe in 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 labeled IO.

A fun guide for learning Haskell is here: https://learnyouahaskell.github.io/

[-] ageedizzle@piefed.ca 1 points 11 hours ago

Very interesting. Haskell definitely intrigues me. What's the learning curve like, I hear it can be a bit tricky?

[-] chaos@beehaw.org 1 points 8 hours ago

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.

this post was submitted on 12 Feb 2026
52 points (100.0% liked)

Learn Programming

2084 readers
144 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. 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