r/ProgrammingLanguages • u/Deslucido • Jan 21 '23
Help Do you guys know a pure functional language with good tooling?
I like Rust for its tooling, but since I tried Haskell I'm in love with pure functional programming.
I know you guys develop one of those like every week, but they are mostly research languages. Is there some with good tooling yet?
47
Upvotes
60
u/mobotsar Jan 21 '23
Lol, no. The tooling of Haskell is not so bad, though.
11
u/Spocino Jan 22 '23
Best I've seen is Lean, fantastic vscode integration, interactive development
24
u/Organic-Major-9541 Jan 21 '23 edited Jan 22 '23
Depends on your expectations on tooling.
Erlang has a language server now, so developing in vscode with the ls is a lot better than before. It's the only
purefunctional language I have worked with (as in it was my job), and the tooling was ok.I think lisp has some good tooling. Emacs uses lisp internally, and it's a very powerful and flexible tool, but it also shows some age.
Scala should interop with a bunch of java stuff, so there should be good tools there.
Edit: apparently, "pure functional programming" has a very narrow definition. I wasn't aware of this and took ot to mean "actual functional programming language, not just languages that claims to be functional while supporting a bunch of non-functional stuff"
23
u/Tejas_Garhewal Jan 21 '23 edited Jan 22 '23
I'm sure F# must have very good tooling, it's development being supported by Microsoft
It also has very good .NET interop(it compiles to .NET and compatibility with it was a major design consideration)
I've never used it though, so I might be wrong
Edit: As mentioned in the reply, F# is not strongly pure, so if any functional language that allows mutability is undesirable, it is not a suitable candidate. I strongly encourage the OP to check it out regardless; if they're interested in pitching the language to colleagues as well, it will be easier to sell F# than it will be to sell any other strongly pure language(imho, of course)
20
u/restrictedchoice Jan 21 '23
PureScript.
spagois very nice, as arepurescript-language-serverandpurs-tidy.6
u/Ashiro Jan 22 '23
Why is no one mentioning Clojure?
16
u/pr06lefs Jan 21 '23
elm
5
u/endless_sine Jan 22 '23
Haskell tooling is bumpy but not so bad, Stack is a pretty good experience I would say
9
u/friedbrice Jan 22 '23
Elm?
8
u/Timbit42 Jan 22 '23 edited Jan 22 '23
Have you looked at Racket? It's a Scheme, which is a functional language but isn't completely pure.
Clojure is also based on Scheme but also isn't completely pure.
6
u/jcmkk3 Jan 21 '23
Gleam and Roc both have a big focus on developer experience and tooling. They are each relatively young and all of their plans haven’t necessarily come to fruition yet.
2
u/jorkadeen Jan 22 '23
We try to have excellent VSCode support in flix (https://flix.dev/). The VSCode extension uses the real Flix compiler so there is always a 1:1 between what the IDE says and what the compiler says.
2
u/keithreid-sfw Jan 22 '23 edited Jan 22 '23
Hi please let me offer a well-meaning curveball answer, I’m happy for civil comments that disagree.
If we start to answer your question with the “good tooling” bit, and tackle it by considering well-tooled languages, then we might mention Julia which is well tooled and a bit more functionally orientated than Python.
It can have Lispy syntax like +(a,b).
Julia is fantastic and really fast and clean and has a friendly community and has great tools for data science ML and now a good front end now the Genie.jl is maturing.
It is my favourite language and it has some functional aspects such as it allows passing of functions as variables.
I am not saying Julia is a hardcore 100% functional language. I am saying it is well-tooled, and more functional than some other functional languages. It can be used in a functional way easily. It’s well worth a try.
2
u/watsreddit Jan 25 '23
Haskell has pretty good tooling, actually. And it has something awesome that Rust doesn't have, which is a great REPL. But it also has a language server, and both stack and cabal are both roughly equivalent to cargo (though cargo is slightly more polished, imo).
ghcupis pretty much equivalent torustup. It also has a number of alternative tools, such asghcid. GHCI also has a debugger built-in that's similar to GDB (though it takes some getting used to, since Haskell is lazily evaluated). And GHC itself has some fantastic profiling tools.2
u/yawaramin Feb 13 '23
I'm not sure if everyone would agree that it's 'good' tooling, but certainly Unison is a pure functional programming language (represents effects as capabilities) with very interesting and a different take on what 'good tooling' can even mean. For example, with Unison your codebase is stored in a database in compiled form; you never have to compile any given piece of code twice.
It has the potential to be revolutionary.
2
u/lboshuizen Jan 22 '23
Different take on “pure”.
There are, and will be, always ways to escape the rules. In law, taxes, physics, math and also programming. The world isn’t perfect. And that’s great.
It allows you to explore, experiment, invent & improve (and as a side-effect hurt your nose).
Striving to be pure is not dictated (yet) by your environment but how YOU choose to “abide” to the rules. Sometimes you need to bend the rules.
Tooling in FP languages is from my pov great, although in some cases not trivial to setup as a starter. There’s a bit more involved than installing Word through a wizzard.
Bite the hard part and enjoy!
(Using haskell, lisp, F#, clojure, purescript)
1
u/an_actual_human Jan 22 '23
Scala, if it counts.
1
u/jolharg Jan 22 '23
Haskell's is amazing atm. Has all sorts that you've heard of and all sorts that you haven't
1
u/[deleted] Jan 23 '23
OCaml is pure-ish and tooling is not bad imo
1
u/XzwordfeudzX Jan 25 '23
Elm
1
u/Ford_O Jan 22 '23
Haskell has one of the best tooling out there (even when compared to impure languages)..
-31
u/[deleted] Jan 21 '23 edited Jan 21 '23
Are pure functional languages even practical for building anything of note.
I mean, programming without mutable state? How?
-8
u/Timbit42 Jan 22 '23
Pure functional languages: Haskell, OCaml, Agda, Idris, PureScript, Elm, Frege, Clean, Nix, F# (when used in a functional style).