4 ms·
>Imperative code is also more concise than equivalent functional code. Okay, I'm really hoping there's a good surprise behind this, because I've been an impera
by jolux 7y ago
>Imperative code is also more concise than equivalent functional code.
Okay, I'm really hoping there's a good surprise behind this, because I've been an imperative programmer for 10 years and a functional programmer for 5 and I have only rarely seen imperative code that was more concise than equivalent functional code. Faster? Sure. More efficient? I'll buy it. Perhaps even easier to read, especially when you get into point-free style on the functional side. But more concise overall? I find that hard to believe, but I'm genuinely excited now! The ultimate trump here would be APL but that's admittedly an eccentric case.
- h91wka 7y agoIn imperative languages you don't need Edward Kmett to invent lenses for you.
- sullyj3 7y agoBut, this is a problem specific to Haskell and its poor record syntax, not the functional paradigm in general.
- tome 7y agoFirstly, that's a non-sequitur, but secondly, in an imperative language with immutable data structures, yes, you do.
- jolux 7y agoI...sure? But you could get a lot of help from Phil Wadler and Simon Peyton-Jones!