Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Those who kill Haskell will also kill Rust


May 31, 2021 Article blog


Table of contents


The article comes from the public number: Architecture Headline Author | A lexander Granin translator | N o clear planning | Xiao Zhi

Editor's note

The author's central idea is not to sing the Rust language, on the contrary, he attaches great importance to the Rust language. H e recalls why Haskell's language "fell to this point" from the king, hoping it would serve as a wake-up call to the vibrant Rust community. The following is the body.

By 2030, I found this article in a folder. F rom the beginning of my writing, I knew that I was right. I think this article should be published because it is a wake-up call to Rust developers: Don't let history repeat itself!

Those who kill Haskell will also kill Rust.

Why would I mention Haskell at this time? W ell, Haskell and Rust are inextricably linked. R ust, it can be said, is Hashkell without a higher order type (HKT). M any of Rust's styles resemble Haskell's. In a way, rust can be said to be the embodiment of Haskell, but it brings a little C-style syntax.

Is Haskell dead?

Haskell was once a language that people wanted to focus on. F rom 2000 to 2010, Haskell was the language every programmer wanted to use, but no one really did, except a few. S ome impressive projects were developed with Haskell, such as many financial projects and payroll systems. H owever, from the point of view of a purely functional programming language, Pandoc is the real project with the Haskell kernel. Some people say "Haskell is too slow" and "Haskell can't do anything", and Pandoc is punched in the face.

But what happened to Haskell? W hy did it stop all of a sudden? N o one uses it to develop important projects now. I s anyone else using GHC Haskell? M aybe one or two more. GHC Haskell has become an academic language that no one really cares about.

In the Haskell era, it was at the forefront of functional programming, explaining the true meaning of functional programming. O f course, there are other functional programming languages besides Haskell, except that they're not that pure, and I'm talking about Scala or JavaScript. I n the mid-2000s, these two languages were Haskell's main competitors. G o and C are followers, and Haskell is leading them, and they've learned a lot from Haskell. Scala programmers know that for loop syntax and many code banks are inspired by Haskell.

Haskell was once king.

At that time, Haskell's dominance was not available in other languages. T he productivity it brings to programmers can be measured by the factor "5". A development team uses Haskell to develop and deliver an application five times faster than Scala or C. The factor "5" has become a very important indicator.

Haskell's strength is beginning to show. H ow many people are using monad? I used it in JavaScript and some in Rust. I n Go, I can do some interesting things with monad. A nd these, in the mid-2000s, were left of Haskell programmers playing. When most people start thinking about monad, Haskell has long had monad and algebraic data types.

In many ways, Haskell was a king, but he died. What killed it?

I'd like to use one word to describe it, but please don't misunderstand it. You might think it's "evil" or "ignorant", but what I'm trying to say is "arrogance".

There is a whiff of arrogance in the Haskell community. N ot that kind of evil arrogance, but the kind of arrogance that makes them feel better than others. T he tools they use are somehow better, they do things better to some extent, and some even arrogantly believe that their victory is inevitable. I t's not the kind of arrogance that slaps you and says, "You stupid Go programmer," but rather a power arrogance. Haskell programmers write a powerful code, a powerful compiler, a powerful language, and they know they can do miracles.

That's not enough. S ome insidious and subtle things happen, leading them to isolate themselves from the rest of the industry. P rogrammers outside the community began to notice what Haskell programmers were doing: "People in the Haskell community don't seem to like us very much, and I don't think we like them either."

Some people may remember some of the discussions on the Reddit forum in the mid-2000s. T here was a group of people out there talking about cool math problems. T hey often sneer at other languages, such as Go. I t's not a big thing, it's not an evil thing, they're snickering: "Mainstream people, ha!" " I was a mainstream Go user at that time!" B ut I don't like them like that. O ver the next few years, I be engaged in the programming language debate. I said to them, "Do we really want to start a programming language battle on Reddit?" " What's interesting is not what they're snickering about, because they have the right to do that, and what's interesting is my reaction. M y response was defensive: "Okay, keep using your Haskells, but we're the ones who can really solve the problem."

This confrontation was very interesting at the time, and quite common. T here is an attitude in the Haskell community, but not the evil one, not out of malice. B ut one attitude is this: "We have good tools, our language is good, we don't have to follow the rules." W e can do our own thing without having to discuss it with others. W e don't need to write other types of programs. " Haskell programmers don't want to write regular programs, they don't want to deal with database-related issues. T hey don't want to face a database model that's been in development for 20 years. I t's so annoying. T hey found alternatives, such as using category theory and dependency types. They built a wall around themselves, lived in a technology bubble, and isolated themselves from the evils of the outside world.

I'm going to define a word here. A s we all know, my definition is just one of many. I f you like, you can also find other definitions of the word. T he word is "professional". I define it as "discipline in the use of power". O ur tools and language provide us with some power, but we need a discipline to use it. I t's not just a discipline that uses tools, it's a kind of community discipline. T he discipline is this: it's a powerful tool, and the more powerful it is, the faster it kills, so we have to be careful with it. Also, we don't denigrate people who are less willing to use our tools.

We might as well redefine "progress" as": "Just because we can do one thing doesn't necessarily mean we have to do it".

So what killed Haskell was its narrowness and inability to meet the needs of the enterprise.

Haskell excels in certain restricted environments, but it has limited power or does not meet the user's desire to solve the enterprise's problems. T hese people don't want to go outside, they don't want to put themselves in real soil. T hey show a sense of "opposition", which is clearly felt by those on the other side. T his parochialism is like hanging a big banner on a screen that says, "I do things my way, you play by yourself." It's like saying, "In our own world, we're great, let others go to hell."

What do I want to save?

I want to save Rust and the community from the same outcome. F rankly, I don't think it's going down that path. F irst of all, I think the Rust community is more dynamic and stronger, and I believe there is no longer that kind of confrontation in Haskell. T hose "powerful C-hormone programmers" have become milder. E veryone was thinking, "Maybe there's something that's going to make Rust different." S o what are they? What can prevent Rust from repeating Haskell's mistakes?

I want to say three things:

The first is discipline. E specially in terms of document discipline, this is not easy. F inish writing the code and don't forget the damn documents. As you all know, how difficult it is to write good documentation so that others can easily use your program.

If humility had been added to the professional basis, perhaps Haskell would not have died. O pposing attitudes, and I know there are some interesting ads like "Mac to PC," "I'm Rails, I'm Java" and so on, I don't think it's harmful, the question is whether you take them too seriously. Unless you build a high wall, or someone else builds a high wall on the other side in response.

The last thing is to solve the "dirty" problem. W e have to sit back and say, "We'll take care of it." I f we are to survive, we must find a way to solve all the problems. If you don't solve it, someone else will solve it.

Remember the fate of the most influential programming language of the first decade of this century. I t opens the way for pure function programming and has a big impact on what we're doing, but it's almost forgotten. And those who use and love it have to turn to Scala for a living, and it almost takes their lives.

Rust is very powerful, but it's easy to destroy it, creating chaos, arrogance, and ignoring business needs, all of which can kill it. I hope we don't make the same mistake again.

Original English:

gist.github.com/graninas/22ab535d2913311e47a742c70f1d2f2b

This article is also excellent in GitHub's review area, and interested readers are recommended to learn more

That's W3Cschool编程狮 has to say about those who killed Haskell and also killed Rust, hoping to help.