this post was submitted on 11 Sep 2025
14 points (100.0% liked)

Functional Programming

1572 readers
1 users here now

founded 2 years ago
MODERATORS
 

cross-posted from: https://gregtech.eu/post/19047959

Specifically, I'm interested in BEAM, but I'm not sure if I should go for Elixir or Gleam. What seems cool about Gleam is that it has static typing.

I have no experience with functional programming at all btw

top 11 comments
sorted by: hot top controversial new old
[–] KindaABigDyl@programming.dev 7 points 1 week ago* (last edited 1 week ago) (1 children)

Haskell is the GOAT

If it weren't for the fact it doesn't have good library support for certain areas, e.g. GUI and graphical apps, I would use it for all my projects instead of C/Rust/Python/etc that I normally use

It's also good for learning bc it drops you in deep. Everything is a pure function and theory based. You will gain a lot of understanding. I also recommend trying to develop point-free notation in Haskell to further your functional knowledge

EDIT: Also, I would personally recommend against LISP (and its derivatives like Scheme and Closure), not bc they're bad languages - they're awesome - but bc they are overly simple in their premise. In LISP, there are basically "things" and "collections of things," and that's it. To me, it's not necessarily even functional, but its own paradigm.

EDIT 2: Also, check out code_report on YouTube. He talks a lot about functional languages (tho he talks even more about array languages lol). Check out the haskell solution on this video

[–] Corbin@programming.dev 0 points 1 week ago (1 children)

Plenty of objects in Haskell are not pure functions; examples include CAFs and IO actions. Haskell is referentially transparent, not pure. It's an acceptable language, but the community's memes are often incorrect or misleading.

There are statically typed Lisps. Even the simplest Lisp has more detail in its type system than you've sketched. Also, Lisps don't have flat set-like collections; they operate on trees. For more detail, refresh your knowledge about the functional paradigm with the corresponding WP or esolangs description.

[–] KindaABigDyl@programming.dev 1 points 5 days ago

At the end of the day Lisps are atoms and lists and that's it

[–] deadbeef79000@lemmy.nz 6 points 1 week ago* (last edited 1 week ago) (1 children)

Start with a language that you do know that has functional features.

Javascript is actually an accessible intro to some concepts and applications.

Then once you have cut you teeth, find the true languages.

Other accessible alternatives: scala and clojure on top of java/jvm.

In my experience, I never really "got" functional programming until I had done the above.

[–] degen@midwest.social 11 points 1 week ago (1 children)

Counterpoint: jumping right into lisp or haskell can be useful to get an idea of the paradigm too. Some concepts are so foreign it's almost better to be farther from the imperative or procedural stuff sometimes.

[–] brian@programming.dev 5 points 1 week ago

middle ground point: start with the clj dialect for the ecosystem you're most familiar with. cljs for js, clj for jvm, etc. then you're learning the new language stuff but don't have to worry about a new ecosystem.

[–] resipsaloquitur@lemmy.world 5 points 1 week ago
[–] devfuuu@lemmy.world 3 points 1 week ago

Simple to learn language and focused on the main fp things (immutability, recursion, etc) gleam is good enough.

Otherwise on another ecosystem I'd recommend to check out standard ml.

[–] matcha_addict@lemy.lol 2 points 1 week ago

Why the interest in BEAM?

[–] snikta@programming.dev 2 points 1 week ago

Gleam seems awesome. However, Scheme/lisp are favorites of mine, so maybe Clojerl?

But if you really want to try out the latest and greatest in functional programming/languages I would suggest Idris2. I believe there is a BEAM back end as well.

[–] Sickday@kbin.earth 2 points 1 week ago

I'd say go straight into Erlang if you're interested in BEAM.