3 ms·
"result=: {&((65 97+/~i.2 13) |.@[} i.256)&.(a.&i.) Very efficient, minimum keystrokes. Can you tell me what it does?" Well; can you tell me what this means?
by V-2 8y ago
"result=: {&((65 97+/~i.2 13) |.@[} i.256)&.(a.&i.)
Very efficient, minimum keystrokes. Can you tell me what it does?"
Well; can you tell me what this means? :) https://www.publicdomainpictures.net/pictures/20000/velka/simplified-chinese-sign-1310616900xnc.jpg https://www.publicdomainpictures.net/pictures/20000/velka/si...
Obviously there are extremes on both sides of this spectrum... It's subjective where the perfect compromise between being explicit and being concise lies. Some languages value the former more (like Pascal or Python...), others are more terse. It's always a trade-off.
"Fundamentally, programming languages are for people, not computers"
Of course, but that doesn't mean the correlation here is as simple as "the more verbose, the better". Otherwise than you imply, verbosity does have its own inherent cost too. It increases the cognitive load on the reader, who now needs to process more text to the same effect, as the meaning-to-text ratio drops.
"Keystrokes are /not/ the expensive or dangerous part of programming, we shouldn't be optimising our languages to reduce them"
It's not about keystrokes though, since code is read much more often than written. Every piece of code written once will be read several times eventually.
So would you prefer eg. begin..end to curly braces? Would you prefer "AND" to "&"? Even wordy language such as Java have been heavily optimized to save space.
It's obviously subjective, but the programming community "votes with their feet", and if you look eg. at the "most loved languages" StackOverflow poll - https://insights.stackoverflow.com/survey/2018/#technology-most-loved-dreaded-and-wanted-languages https://insights.stackoverflow.com/survey/2018/#technology-m... - it doesn't make an impression like wordiness is what people are after in a programming language.