this post was submitted on 23 Apr 2025
24 points (90.0% liked)

Programming

19710 readers
377 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] solrize@lemmy.world 10 points 15 hours ago (2 children)

Your crossposted question was a choice between Clojure and Common Lisp. Between the two I would say Clojure is more functional, but it comes with the baggage of the JVM. Common Lisp on the other hand is more of a 1980s language where you can use a functional style some of the time, and with some pain.

If you want a Lisp-like language, the usual starting point is Scheme, and if you want something with more creature comforts, try Racket. Either way, you'd start by reading SICP (fulltext here). But I think that whole approach misses out on an important aspect of FP, which is how type systems classify values.

So I'd say go with a typed functional language. OCaml is something like what you are used to, while Haskell is more "drinking from the fire hose" (steeper learning curve, but I think you will get more from it).

For Haskell, learnyouahaskell.com is a good place to start. I don't know if there is something similar for OCaml. Haskell can be seen as a gateway drug to even more pointy headed languages like Idris.

Yet another thing to look at as a possible migration point from Ruby is Elixir. It's not really so FP, but it's very practical if you're mostly interested in web development rather than programming languages per se. It's dynamically typed like Ruby and uses Ruby-like syntax, so you should be able to switch to it fairly easily.

Clojure debugging is a pain because of the thousands lines of Java stacktrace. I really can’t recommend this.

[–] Shareni@programming.dev 0 points 14 hours ago (1 children)

Common Lisp on the other hand is more of a 1980s language where you can use a functional style some of the time, and with some pain.

Isn't the main issue with it that you're not forced to be functional? It's supposed to be pretty good at it with the correct libraries.

Either way, you'd start by reading SICP

You really don't want OP to learn lis

[–] solrize@lemmy.world 1 points 14 hours ago

Isn’t the main issue with it that you’re not forced to be functional? It’s supposed to be pretty good at it with the correct libraries.

I'd say CL's main issue is that it's anachronistic by now, and when used idiomatically it's an imperative language (think of LOOP). You can use some functional idioms in it, but it gets painful to do so.

Look at the article "Why Functional Programming Matters" and imagine rewriting the code examples in Scheme (confusing but straightforward) and then in CL (ouch).