In my experience learning, teaching, and watching other people learn FP, it's far easier to learn FP with a language which is actually designed for it, e.g. , Elm. JavaScript isn't that. It carries too much legacy baggage. Too many gotchas; too many pointy bits. It's also just super noisy. There's a reason why someone had to write The Good Parts . I don't buy the idea either that modern JavaScript is somehow devoid o…
I think it depends. It's hard to learn more than one thing at once; if you already know JS well, learning about functional programming using it makes sense to me. It's tricky to learn both a new language paradigm and a new syntax at the same time. Of course there are limitations to how functional you can really be in JS; that said, I like the idea of introducing some basic concepts with JS. If people like the idea, t…
Learn Functional Programming Design from Redux
11–20 of 48 posts
Re: Learn Functional Programming Design from Redux
#12In my experience learning, teaching, and watching other people learn FP, it's far easier to learn FP with a language which is actually designed for it, e.g. , Elm. JavaScript isn't that. It carries too much legacy baggage. Too many gotchas; too many pointy bits. It's also just super noisy. There's a reason why someone had to write The Good Parts . I don't buy the idea either that modern JavaScript is somehow devoid o…
I later tried to learn F# and while the syntax was foreign, it turned out that it was MUCH easier to write FP code because the language had native operators for composition, etc. The code was also much easier to read.
I think it would be great if JavaScript got some FP syntax natively (see the pattern matching proposal). But hacking functional principals using arrays and helper functions just leads to hard to read code, especially for people not familiar with the specific FP library you chose to use.
Re: Learn Functional Programming Design from Redux
#13Earlier quoted context omitted.
Learning new syntax really isn't hard. Bear in mind that quite a lot of supposedly "modern" JavaScript is new syntax.
Learning new syntax really isn't hard. When you make an absolute claim like "Learning new syntax really isn't hard." you're really saying "I find it easy therefore everyone else must too." That's poor quality thinking at best, and actively toxic to your peers at worst. In my twenty+ years as a mentor to developers I've learned that objective statements about what is and isn't hard in programming are always going to f…
Describing syntax swaps as a "move from one mental model to another" is intellectually dishonest.
Re: Learn Functional Programming Design from Redux
#14In my experience learning, teaching, and watching other people learn FP, it's far easier to learn FP with a language which is actually designed for it, e.g. , Elm. JavaScript isn't that. It carries too much legacy baggage. Too many gotchas; too many pointy bits. It's also just super noisy. There's a reason why someone had to write The Good Parts . I don't buy the idea either that modern JavaScript is somehow devoid o…
Not only that. If you use types, and then an FP library, and then immutability, these three are at always at odds with each other.
Re: Learn Functional Programming Design from Redux
#15 main :: (RealWorld ->) ((), RealWorld)
I've been doing haskell for a few months now. I don't think I have ever seen a expression like this. It looks like State. Is this even valid syntactically? I'm Probably bikeshedding.Re: Learn Functional Programming Design from Redux
#16In my experience learning, teaching, and watching other people learn FP, it's far easier to learn FP with a language which is actually designed for it, e.g. , Elm. JavaScript isn't that. It carries too much legacy baggage. Too many gotchas; too many pointy bits. It's also just super noisy. There's a reason why someone had to write The Good Parts . I don't buy the idea either that modern JavaScript is somehow devoid o…
> JavaScript isn't that. It carries too much legacy baggage. Too many gotchas; too many pointy bits. It's also just super noisy. Not only that. If you use types, and then an FP library, and then immutability, these three are at always at odds with each other.
In addition, it becomes a real pain when using generics with constraints in TS. TS doesn't support either type classes or module/namespace level generics so you end up duplicating the same constraints applied to generic parameters across several functions.
It is often easier to just use stateless classes instead and incur the runtime overhead of instantiation even if that object serves no purpose.
Re: Learn Functional Programming Design from Redux
#17main :: (RealWorld ->) ((), RealWorld) I've been doing haskell for a few months now. I don't think I have ever seen a expression like this. It looks like State. Is this even valid syntactically? I'm Probably bikeshedding.
Re: Learn Functional Programming Design from Redux
#18IMO Redux is a terrible way to start learning functional programming. There is too much boilerplate code and other code (ie. reducer, selectors, side effects, react components) that will confuse beginners and make the goal of learning functional programming harder. It's like telling someone who wants to learn to drive, here's the road laws book, car manual, car service manual, offroad rally driving guide and engine t…
Re: Learn Functional Programming Design from Redux
#19In my experience learning, teaching, and watching other people learn FP, it's far easier to learn FP with a language which is actually designed for it, e.g. , Elm. JavaScript isn't that. It carries too much legacy baggage. Too many gotchas; too many pointy bits. It's also just super noisy. There's a reason why someone had to write The Good Parts . I don't buy the idea either that modern JavaScript is somehow devoid o…
Re: Learn Functional Programming Design from Redux
#20main :: (RealWorld ->) ((), RealWorld) I've been doing haskell for a few months now. I don't think I have ever seen a expression like this. It looks like State. Is this even valid syntactically? I'm Probably bikeshedding.
The Haskell snippet included is basically gibberish. It’s best to ignore it.