r/functionalprogramming • u/kichiDsimp • Sep 16 '24
Intro to FP 2nd language after Haskell
I have learnt the basics of Haskell in last 3 months I want to try a new FP language which is more real world and can teach me new stuff My options are
- Scala
- F sharp
- Gleam
- Clojure
- Any other language that I may have missed
I was also thinking to read the "Red Book" . Any help is appreciated
Topics I would like to learn in depth are
- L-Calc
- Categ- Th eory
34
Upvotes
7
u/Epistechne Sep 16 '24
If you'll be developing for a Windows/.NET environment at all then F# will be a natural choice.
6
u/recursion_is_love Sep 16 '24
What is your real world? Can you describe more?
6
u/[deleted] Sep 16 '24
Elixir
2
u/[deleted] Sep 16 '24
Elixir is cool had a blast with it making a dumb chat website.
I liked it so much I am stealing the shit out of the design for my own little dumb languge
32
u/corwin-haskell Sep 16 '24 edited Sep 16 '24
Haskell is practical, though a little hard. But,
If you're interested in JVM, try Scala 3.
If you're interested in .NET, try F#.
If you're interested in BEAM, try Gleam.
If you're not a FP clean freak and like the type system of Haskell, try Rust.
If you like Jane Street or want Rust with GC not Go, try OCaml.
If you want to study more theories, try Agda/Lean 4.
27
u/jmhimara Sep 16 '24 edited Sep 17 '24
In terms of real-world use, I would say Scala is top followed by F# and Elixir.
21
u/pauseless Sep 16 '24
Clojure will teach a very different form of FP. It’s much more interactive when you embrace the REPL. I think knowing both an ML family and a Lisp family language, is valuable, if the goal is learning.
8
u/Il_totore Sep 16 '24
Scala is probably the most job-friendly FP language alongside with Clojure and Elixir and has Cats which is basically category theory in Scala used in many companies.
4
u/Migeil Sep 16 '24
These are two conflicting statements imo, at least if you're hoping to do both at the same time.
Neither lambda calculus nor category theory are "real world" in the sense that they help you build applications.
They're very interesting and can provide tons of food for thought. They can push you in a certain direction or style of coding, but if your goal is creating applications, then they won't help you, there is no "mathematically correct" way to perform and http request for instance.
9
u/ahronl Sep 16 '24
Clojure
3
u/Dear_Lawyer4688 Sep 16 '24
OCaml
3
u/[deleted] Sep 16 '24
Ocaml is also a good pick
3
u/burtgummer45 Sep 16 '24
they knew you were going to ask that question and wrote Real World OCaml
3
u/HerbM2 Sep 16 '24
You'll really make more progress if you have real projects you want to please and choosing a language that compliments those projects will probably give you the best results.
3
u/iTitou Sep 17 '24
What about Elm (https://elm-lang.org/) ?
3
u/LambdasForPandas Sep 27 '24
I highly recommend Julia if you have any interest in AI, data science, or scientific computing. I've been using it throughout my graduate program, and I've found it to be incredibly practical for solving real-world problems.
2
u/Arc925 Sep 16 '24
+1 for Clojure! Working with the nREPL (network REPL) plugged directly into your running app and being able to evaluate code directly from the opened file buffer, instead of typing manually into the REPL, is such a joy! Clojure (like any LISP) is also very well-suited for structural editing, which for me drastically descreases the friction between wanting to write/change some code and actually doing it.
2
u/npafitis Sep 16 '24
I'd say Haskell is suitable for realworld. If you want something more "industry"-wide I'd recommend Scala or F# (I prefer Scala).
If it's about learning a different kind of functional programing + metaprogramming I'd say Clojure. Clojure is also fairly used in production, might be even more than F#, but it's untyped (there's a library `typedclojure` that provides a fancy typesystem but not widely used, but the author is developing on it constantly), and there's little usage of category theory.
I'd recommend Gleam but I don't think you'd find many jobs in it as it is super young. Elixir is another one that's somewhat similar to Clojure in many ways (except for syntax), and also widely used in industry but also untyped and not focus around category theory.
Can't really go wrong with any of these choices.
2
u/GunpowderGuy Sep 17 '24
If You want " a real world " fp language, then i recommend racket. But the fp language i recommend the most is idris2
2
u/xiaodaireddit Sep 17 '24
Basics of Haskell. Isn’t Haskell the FP with the most depth? Can’t think of a feature in other FP that are not in Haskell. Maybe eagerness but that can be emulated with the EagerMonad
2
u/nrnrnr Sep 17 '24
Definitely consider OCaml and its amazing module system. F# is also a good transition from Haskell.
2
u/homological_owl Sep 17 '24
Don't use pure functional languages if you want to solve real world problems. Use something that allows you to use both fp and oop (in some of its "denominations") Golang, Kotlin, Scala~, for example
2
u/pkumarn Sep 20 '24
Lots of Scala fans here. I somehow felt a lot of mental pain whenever I used Scala.
I would say try F sharp for .NET Kotlin for JVM. Also OCaml
2
u/sod1102 Sep 18 '24
Take a look at this chart: https://survey.stackoverflow.co/2024/technology#2-programming-scripting-and-markup-languages
2
u/Voxelman Sep 16 '24
It's not really functional, but real world:
Rust
1
u/GunpowderGuy Oct 18 '24
I highly recommend idris2. Its like haskell 2 ( well 3 , idris1 was haskell 2 ). It has both more innovative features ( dependent types and totality checking ) but less technical baggage