Student: Fang, I don’t understand immutable data.

Fang: Normal, I couldn’t understand it before I learned Haskell.

Student: You mean I have to learn Haskell to really understand immutable data?

Fang: It doesn’t have to be Haskell, it can be any programming language that “supports functions” and “immutable data”.

Student: Why, can’t you understand it with JS?

Fang: I can say that at least I can’t explain functional expressions with JS, maybe I’m not good enough.

Student: So I can understand immutable data by learning Haskell?

Fang: That’s not true.

Student: What do you mean?

F: Haskell takes advantage of “immutable data” so that you think “immutable data” is a good thing. Also, immutable data doesn’t need to be understood, it’s just a convention.

Student: Appointment?

Fang: Yes, the programming language you learned before promised “datafile” and showed you the advantages of “datafile”.

Student: Yeah, I think it’s normal to have variable data.

Fang: Actually not, you just have a preconception. You don’t see the downside of variable data.

Student: What’s the short board?

Fang: You don’t think these weaknesses are weaknesses now, because you haven’t seen the advantages of immutable data.

Student: I really don’t see the benefit of it. I think it’s superfluous.

Fong: That’s the problem. You don’t agree that “no side effects”, “transparent references” and “pure functions” are advantages. You currently consider these concepts to be hobble concepts, right?

Student: Yeah…

Fang: You are limited by current computer education. You know object-oriented, Turing machines, but not high odd numbers, lambda calculus, Y combinators, but they are just as important.

Student: It’s really the first time I’ve heard of…

Fang: So, do you want to learn functions?

Student: What are the benefits of finishing?

Fang: No, just broaden your mind. You’ll probably still be programming in JS or Java, with very little use of these techniques. So, do you still want to learn functions?

Student: How long will it take you to finish?

Fang: How long did it take you to learn and get used to an instruction programming language like JS or Java?

Student: Half a year.

Fang: Then it takes at least as long to get used to the function, and once you get used to it, you can’t go back. I can say a sentence that takes you a week or more to understand. Do you still want to learn functions?

Student: Sounds like it’s doing more harm than good?

Fang: I guarantee that the advantages outweigh the disadvantages. I just don’t see the advantages in the short term. You will have a completely different understanding of programming after learning it, but your salary won’t necessarily increase.

Student: Ok, I’ll try to learn.

We start lesson one tomorrow.

Follow-up: juejin. Cn/post / 693826…