4 ms·
Counter: This is what incrementally leads to voodoo Perl scripts that only the one magician who wrote it can read. Sure all those tools are great individually.
by anonemouse145 9y ago
Counter: This is what incrementally leads to voodoo Perl scripts that only the one magician who wrote it can read. Sure all those tools are great individually. But nobody else knows what they are, so maintaining it is impossible.
In a trivial example like this, between two similar executions, I'd tend toward the C-like one for readability. Only use the language feature if it really saves a lot of lines or abstractions etc.
So java8 if I could rewrite 100 lines of code so that a whole function is just one lambda and nothing else, sure go for it. That's just a StackOverflow away for anyone. But I wouldn't toss in a lambda with a bunch of (insert new language feature) all on one line. I wouldn't expect another programmer to know all that yet.