Edit (before I will not be able to do so): thank you for everyone's replies (in advance, too)!
Edit (before I will not be able to do so): thank you for everyone's replies (in advance, too)!
My favorite is still Clojure by miles ahead, besides it being a functional language, its data-oriented approach to writing programs is completely different from anything else I've ever seen. I currently work with Elixir, and there isn't a day that goes by without me thinking "gosh, this would be so much simpler to solve in Clojure".
My colleagues are so sick of hearing this.
I feel the same way with Go, OCaml, Factor, Erlang / Elixir, Common Lisp, and even Perl, depending on what I am doing. Heck, I still have new projects written in C due to its simplicity, which is what I want sometimes, and more control.
This kind of task is also extremely well suited to a repl. You define a temporary var, and start threading it through a series of super small functions that only slightly change the data until you get what you want.
(->> my-data
parse
(filter some-pred)
(map my-mapper)) ;; and so on, if you need more
For me, the big thing is REPL driven development, and immutable data structures. Everything can be inspected. It's easy to get insight into basically any small piece of the program as if you were using a debugger (but you don't have to).For what it's worth, I actually really enjoyed using Haskell. It did force me to think differently about problems and I feel that this has carried over to writing cleaner code in non-functional languages like Go/Java. I liked it so much so that I wrote a book about writing functional code in Go along with a supporting OSS library.
Would I recommend it for really large-scale applications? Maybe not, because you'd want a mature ecosystem with a lot of support, and the secondary issue is that you want to have a large candidate pool when hiring people.
Small disclaimer though, the last time I used Haskell professionally was in 2018-2019, so it's not 'recent' experience.
Typescript on the other hand feels like being confined to a small room. There's not much flexibility. Not much is open to me. It's very regimented and I can sense better solutions, but they're off limits to me either because of the required type gymnastics or the language primitives.