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

Functional Programming

1570 readers
27 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 10 comments
sorted by: hot top controversial new old
[–] snikta@programming.dev 1 points 8 hours 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.

[–] deadbeef79000@lemmy.nz 5 points 19 hours ago* (last edited 19 hours 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 10 points 18 hours 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 17 hours 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.

[–] KindaABigDyl@programming.dev 4 points 18 hours ago* (last edited 18 hours 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 1 points 14 minutes ago

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.

[–] resipsaloquitur@lemmy.world 4 points 19 hours ago
[–] devfuuu@lemmy.world 2 points 17 hours 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.

[–] Sickday@kbin.earth 2 points 18 hours ago

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

[–] matcha_addict@lemy.lol 0 points 13 hours ago

Why the interest in BEAM?