News for hackers. Stuff that matters.
Re:Teach yourself Computer Science functionally by whateverman23 on Tuesday June 13, 2023 @07:20PM (#36319040)
I don't know why you think I said high level mathematics knowledge is required to learn FP. I simply said that in my experience, those who found FP easier to learn than imperative programming tend to be those who have a background in high level mathematics. Not everyone follows this pattern, of course.

Remember, we're simply comparing FP to imperative programming. I'm simply not convinced that FP is easier to learn than imperative programming for the vast majority of newcomers, and that's what I'm arguing here.

Re:Teach yourself Computer Science functionally by weatherlight on Wednesday June 14, 2023 @01:44AM (#36321897)
Keeping track of all that state in one’s head is hard.

I think because of the limitations of FP it’s much easier for new programmers to reason about programs and honestly, learn to program.

New developers don’t have to micromanage the computer, the way that the would with an imperative lang.

For example, SQL isn’t FP, but think about the number of business analysts whose lives would be more difficult if the had to write imperative programs to fetch data from some sort of data store.

I think what in comes down to is simple vs easy. Imperative programming in the very very beginning is easy, buts not simple.

Because there’s all this implicit state in your program, as the program grows it becomes very very complex. It’s no longer simple.

There’s this really great talk about this idea by rich hickey, the creator of clojure, that dives into this in detail.

https://youtu.be/SxdOUGdseq4

Re:Teach yourself Computer Science functionally by worrycue on Wednesday June 14, 2023 @03:17AM (#36322570)
Learning and using are 2 separate things.

FP is supposedly easier to use in the long run but it’s definitely harder to pick up.

Imperative is the opposite since it’s analogous to writing out a list of things you want the computer to do - a concept even the uneducated can understand.