Translation of an article on language choice and compromise of complexity and productivity.Warning: this is a rant.
Recently, I took another big step forward on my path to enlightenment in Haskell. Finally, I see how many different parts of the Haskell mosaic harmoniously put together. At this point, I felt ready to go ahead and write useful programs. I
read the source code of the
Scotty web framework and was pleasantly surprised that I understood how it works. I'm totally in love with Haskel. I like that it makes you think. You do not just open a text editor and start hitting the keys to write a program on Haskell. I love the fact that Haskel encourages generalizations and abstractions. One of the “eureka” moments in my way was understanding all the consequences of why a function of type
a -> a has only one implementation. I got hooked on the ability to run the program for the first time and know what it will earn (after fighting with the compiler for ages). I think monads and lenses are very smart things. Yes, by many criteria, Haskell is an ideal programming language.
')
And it took me 4 years to come to this.
I used to be so disappointed in him that I took breaks for weeks or months, simply because I didn’t see the point of continuing on. But I always came back. And now, I finally arrived where I am. I would say that I am a middle class Haskellist. Of course, what I think about is to write several programs at work on Haskell, which will be quite easy, given our service-oriented architecture.
I also played with
Purescript - this is a Haskell dialect that is compiled into Javascript. In many ways, Purescript is much better than Haskell, because he does not have that historical baggage. But communicating with my colleague, who does not know Purescript, about starting to use it in our code base, I understood the brunt of what I asked to learn. That sounds great, of course - say “Let's rewrite it in Purescript” and expect that someone will come back after the weekend, having learned it well enough, despite the fact that it took me 4 years myself.
Another great example is the open source community. If you choose Haskell for your open source project, you will be productive, you can safely refactor code, write a little code — but how many people will want to learn Haskell to contribute to your project or make a fix?
Many of my friends in Haskell love to make fun of
Go . I myself have done it more than once. Keep in mind, this language is
objectively a very bad design. Error handling, the lack of generics, a terrible package manager, an absurd type system, this
range, and so on. This is almost the exact opposite of Haskel.
And with all this, Go is much
more popular than Haskell, according to GitHub. Suddenly, there are so many amazing projects already written on Go, like Docker, InfluxDB, etcd, consul, prometheus, packer and many others. Unlike Haskell, if you ask a colleague to learn Go in one weekend, they will return with a small program that they could already write on it. For some reason, the worse tool is definitely used by the masses to create cool things.
What should we take out of this? The choice of programming language matters. Programming is a social activity. It seems that "less features" equals "easier to master." Generalization and innovation in programming languages ​​seem to go out of fashion. Creating programs that solve real problems is more important than using a sharp ax. We will almost certainly prefer the worst tool that is easy to use without having to read the instructions. We would rather click on a photo with your smartphone than learn how to use a professional SLR camera.