4 ms·
Redux is not idiomatic JavaScript though. It’s trying to make JavaScript immutable and have adt which it doesn’t. If you use elm, reasonml, rescript, etc this
by mrh0057 6y ago
Redux is not idiomatic JavaScript though. It’s trying to make JavaScript immutable and have adt which it doesn’t. If you use elm, reasonml, rescript, etc this pattern is a lot easier to implement than with JavaScript.
- will_pseudonym 6y agoI wasn't readily familiar with the acronym ADT. It's "Algebraic Data Types" for anyone else in the same boat. https://en.wikipedia.org/wiki/Algebraic_data_type https://en.wikipedia.org/wiki/Algebraic_data_type
- tartoran 6y agoIn CS it also refers to Abstract Data Types
- will_pseudonym 6y agoAh, good call. Thank you! Here's a reference I found that explains the differences between those two concepts, as applied to Scala: https://stackoverflow.com/questions/42833270/what-is-the-difference-between-abstract-data-types-and-algebraic-data-types https://stackoverflow.com/questions/42833270/what-is-the-dif...
- d13 6y agoYup, it’s beautiful in Elm and makes no sense in JavaScript, which doesn’t need it.