IMO 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…
Learn Functional Programming Design from Redux
21–30 of 48 posts
Re: Learn Functional Programming Design from Redux
#22Re: Learn Functional Programming Design from Redux
#23In 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
#24In 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…
Are you implying that const _doesn’t_ give you an immutable value? Or are you purposefully ignoring the difference between a primitive value and a pointer to make your point?
https://dev.to/valentinogagliardi/once-and-for-all-const-in-...
Re: Learn Functional Programming Design from Redux
#25In 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…
Hey yakshaving, Osiris and others who agree with the sentiment of learning FP via Elm. Do you know of any good resources to start out with?
Re: Learn Functional Programming Design from Redux
#26Earlier quoted context omitted.
Are you implying that const _doesn’t_ give you an immutable value? Or are you purposefully ignoring the difference between a primitive value and a pointer to make your point?
The `const` keyword in JavaScript does not give you an immutable value. This is not up for discussion. https://dev.to/valentinogagliardi/once-and-for-all-const-in-...
Other thing is (and I believe this is what the OP is asking you) - if you say:
const a = 1;
a will always be 1 (inside the scope).
Sure if you say:
const o = { a: 1};
you can change the value of a inside the o, but the o (the pointer as the OP is saying) is not changed. I have 0 experience with Elm, but a _lot_ of popular languages have this behaviour for const/final
Re: Learn Functional Programming Design from Redux
#27Earlier quoted context omitted.
Are you implying that const _doesn’t_ give you an immutable value? Or are you purposefully ignoring the difference between a primitive value and a pointer to make your point?
The `const` keyword in JavaScript does not give you an immutable value. This is not up for discussion. https://dev.to/valentinogagliardi/once-and-for-all-const-in-...
Perhaps this would be clearer: "The identity of a const object is immutable but its state can be mutable."
Re: Learn Functional Programming Design from Redux
#28Earlier quoted context omitted.
The Haskell snippet included is basically gibberish. It’s best to ignore it.
Has it been removed? I don't see any Haskell in the article.
[0] -- https://pitayan.com/assets/static/haskell.cbab2cf.82d9f5b091...
Re: Learn Functional Programming Design from Redux
#29Earlier quoted context omitted.
The `const` keyword in JavaScript does not give you an immutable value. This is not up for discussion. https://dev.to/valentinogagliardi/once-and-for-all-const-in-...
const value can be redeclared in a different scope - but to be very precise; this is not really question of (im)mutability - it is a different value inside a scope, the original value is not changed. Other thing is (and I believe this is what the OP is asking you) - if you say: const a = 1; a will always be 1 (inside the scope). Sure if you say: const o = { a: 1}; you can change the value of a inside the o, but the o…
I think the article I linked to earlier was already sufficiently unambiguous. To clarify once again: If you can mutate a value, then the value is mutable. Mutable means it is not immutable. The `const` keyword in JavaScript does not give you an immutable value.
Re: Learn Functional Programming Design from Redux
#30Earlier quoted context omitted.
Has it been removed? I don't see any Haskell in the article.
It's still there as far as I can see, it's in an image[0]. I believe their intention is to show a kind of pseudo-desugaring of what the IO monad actually does internally. [0] -- https://pitayan.com/assets/static/haskell.cbab2cf.82d9f5b091...