2 ms·
I love how the author gives comprehension and composability as goals for code over adherence to any dogma. One interesting note is that the quicksort code in H
by RcouF1uZ4gsC 10y ago
I love how the author gives comprehension and composability as goals for code over adherence to any dogma.
One interesting note is that the quicksort code in Haskel illustrates a very important point about code evolution. Suppose you wanted to avoid the worst case quadratic behavior. There is not a good evolution strategy that goes through median of 3 pivot, median of 3 pivot with randomization, and introsort. With the equivalent imperative code, the evolution strategy is pretty easy by just adding a few if statements.
- smt88 10y agoComprehension and composability are dogmatic. There are people who criticize code that isn't concise enough, even if being concise would make it harder to comprehend. Using lots of magic or overly-terse languages are also valued by some people and not by others. Composability is also something that is totally alien to large sections of the OOP community. If you've ever dealt with a legacy PHP or Java framework, you'll know what I mean. They heavily use inheritance over composability.