r/functionalprogramming • • Dec 02 '24

Question What languages to start learning FP?

The purely functional languages I know off the top of my head are Haskell and Elixir, but I know there’s plenty more.
What’s generally recommended as the best language to learn pure FP?

Note that I’m not a complete beginner in programming. I’m far from experienced but I know more than just the basics

30 Upvotes

41 comments sorted by

View all comments

Show parent comment

1

u/haglobah Dec 02 '24

I mean, I'm not infinitely certain, but I think the 'pure' in 'pure FP' comes from pure functions (meaning 'functions as we know them from Math').

Then, pure FP is the branch of FP that gives you tools to ensure the purity of functions (e.g. Haskell), in contrast to Elixir or Clojure, which don't.

So it's "programming with almost only pure functions", rather than "A language that lets you program in a functional way only". Since there are no pure objects (afaik), Smalltalk isn't called a "pure OOP" language.

3

u/larryobrien Dec 02 '24

It's objects all the way down in Smalltalk. Primitives, the environment, the ST syntax itself. I've absolutely used the phrase "pure OOP language." Can't see why that's wrong. (I mean, there's a low-level implementation and at least the old commercial STs could call C binaries, but that's quibbling.)