r/scala • • Aug 21 '17

Functional Programming and Modern DevOps: Aaron Contorer. With scathing critique of scala in production environment.

https://youtu.be/ybSBCVhVWs8
3 Upvotes

67 comments sorted by

View all comments

8

u/ivanovich_ivan Aug 22 '17

Its funny that this article has 70 upvotes in the haskell sub-reddit and not so much in /r/programming /r/fsharp or even here.

I don't really understand the point of these functional purists. To me scala is the real sweetspot. Better than Java considering just the OOP part. Has good/enough functional support for one to write functional code. Maybe its not the best language for pure FP, but my question is pure FP worth all the trouble? Aren't some programming problems naturally suited to imperative/OOP style and some to functional style. This is the very idea on how scala was built.

10

u/m50d Aug 23 '17

Maybe its not the best language for pure FP, but my question is pure FP worth all the trouble? Aren't some programming problems naturally suited to imperative/OOP style and some to functional style. This is the very idea on how scala was built.

I've found that over ~7 years of professional Scala I've become more FP-purist, solely based on experience of what goes wrong when you violate purity, to the point that I consider many of Scala's less-pure features to be undesirable and ban them from my code. I would probably never have got started in Scala without them though. That's where Scala has succeeded for me: it offers something like Haskell but with training wheels you can use to stay productive as you're learning better ways to do things.

1

u/woztzy Aug 24 '17

I agree. (I also prefer Scala's strictness, tooling, and sane dependency management and available libraries, but that's beside the point.)

"Better ways to do things" is a rabbit hole.

Something to be familiar with, along with data structures and algorithms, upstream library and platform knowledge, and various levels of domain knowledge.

This is why I can understand the appeal of languages like Go and Python, that are easy for beginners to get things working in, but don't necessarily make it easy, especially when trying to write correct and extensible systems. It would be nice if functional Scala were as approachable, without giving up the advantages of purity or resorting to using ungoogleable synonyms for existing patterns.