4 ms·
>and you are now typing ":" over "extends" thousands upon thousands of times That's blatant hyperbole, and also a worthless argument. How many times have you t
by Sir_Substance 8y ago
>and you are now typing ":" over "extends" thousands upon thousands of times
That's blatant hyperbole, and also a worthless argument. How many times have you typed "int"? Should we replace it with a symbol? Maybe go back to space-cadet keyboards[1]?
J is a language built around symbols for maximum programming speed. It's not an esolang, it's real and usable, and recently updated. Here's a very simple J function:
result=: {&((65 97+/~i.2 13) |.@[} i.256)&.(a.&i.)
Very efficient, minimum keystrokes. Can you tell me what it does?
Fundamentally, programming languages are for people, not computers. Otherwise, we'd all be coding in assembly. Keystrokes are /not/ the expensive or dangerous part of programming, we shouldn't be optimising our languages to reduce them. Optimising languages to reduce miscomprehension is the future, that's where expensive developer time and business risk is concentrated.
Preferring to type a colon instead of the word "extends" is, bluntly, the sort of thing you solve with a custom autohotkeys file.
In any case, it's a minimal gain either way with the : operator, that kind of decision won't make or break any language. But this is the internet and if we're going to argue over something so trivial, I'm going to argue that on the most nitpicky level, "extends" is clearly a better choince than ":".
[1] Space-cadet keyboards are really cool
- 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.