Additionally, you become unaccustomed to “discovering” the intention of loops — I think this is at the root of a lot of reduce vs. for loop arguments. Once you’re used to count/filter/find/etc., you become annoyed when you discover a loop was just doing one of these.
-
-
Prikaži ovu nit
-
It’s like every loop is burying the lead. It states up front information you don’t care too much about (iteration count), and hides internally what’s actually going on. When you are used to this kind of code it’s actually not too bad, your pattern matching is trained for this.
Prikaži ovu nit -
And I do want to stress the value-judgement-free nature of this: I think once you program “functionally” you lose training to identify these looping patterns. You replace that with e.g. currying patterns — things that make the code look inscrutable to non-functional programmers.
Prikaži ovu nit -
Because of this, I think the people best suited for explaining true benefits are people early in the transition. They are still making decisions “neutrally”, vs. much later on when the arguments start to sound more like “because other code is unreadable!”
Prikaži ovu nit
Kraj razgovora
Novi razgovor -
-
-
How does this correlate with overall code quality for you? For example, can you read the redis source fluently?
-
Interestingly, I think it has a bigger effect on the quality of *my contributions*. I like to stay away from “code quality” analysis, but I can speak to debuggability. With immutable code, I feel it’s easier for me to make changes that don’t have unintended. consequences.
- Još 2 druga odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.