3 ms·
just use ramda ¯\_(ツ)_/¯
by beaconstudios 8y ago
just use ramda ¯\_(ツ)_/¯
- 3131s 8y agoThat's my feeling too, would rather not have to trust myself to remember any of this. Or Lodash-FP...
- marcosdumay 8y agoOr Haskell, or a lot of other languages. It's so empowering to be able to answer this question with an instantaneous "no, of course not, it can't be". People that never experienced it have no idea.
- jstimpfle 8y agoThere is another version of this question, "now how do I change this thing? I designed my program so carefully to be almost completely pure, but now I want to try this other thing and I'll have to rewrite the code. To avoid that I will use this other hack that is unreadable and has sub-optimal performance" (Maybe I'm just doing it wrong?)
- marcosdumay 8y agoThere are two different large worlds in computing. In one of them it matters if your computer will stop for 10ms ever couple of minutes, or if you use an extra 20MB of memory. This is the world of C, Rust and assembly, and you'll be stupid to try high level code structures here. The other world is where mostly everybody lives. Here having your code feature complete and correct is overwhelmingly more relevant than putting it above the 95th percentile in performance, and you would be stupid to keep adding complexity just because it's sub-optimal. It should be very clear what world you are in, because there are actually very few borderline problems.
- jstimpfle 8y agoIt's not about performance, at least not 95th percentile performance, by far. It's almost never about that, and it's not what I was talking about. I'm totally fine with less than 20% almost always, and often performance just doesn't matter at all (as you say). But - if an architecture is wrong, sometimes the best you can get without rewriting everything could be like 1%. Maybe the requirements can simply not be fulfilled this way. In any case, my comment was mostly about the development process. I don't want to start a heated discussion (I've started too many of them in the past) so all I will say is what I care about is control, in multiple ways.
- marcosdumay 8y agoLooks like I misunderstood your comment (but it is sometimes about performance, there are people on that performance above everything world). Yes, you are going into it wrong. What I can see on that comment is that: - You expected to write a "mostly pure" program in a pure language. It won't let you do that, you will write a pure program. You also do not need to be careful in doing it. The most obvious thing you get on a strict language is carelessly - you don't have to care about things that the language does not allow. You focus on (re)writing your program. - As a consequence of the first point, the more strict (on anything, including mutability) a language is, the easier it is to change old code, because you can assume a lot of stuff about it, and because you care less about making mistakes. - Specifically about mutability, it does not take any control away. Mutable values are exactly as expressive as immutable ones. You can have mutability semantics on an immutable language, and most try to make it as near a first class syntax as possible, but the one change is that you will have to make it explicit, one way or another.
- deleted 8y ago[deleted]
- beaconstudios 8y agofor sure. Immutability is awesome (or I guess more accurately, state minimisation and explicit management of the remainder).
- loftyal 8y agoimmutablejs