3 ms·
> Terseness is an anti-feature. K&R got it wrong. I disagree. You spend very little time learning a language, compared to the amount of time you spend using i
by earenndil 7y ago
> Terseness is an anti-feature. K&R got it wrong.
I disagree. You spend very little time learning a language, compared to the amount of time you spend using it. It pays to take the up-front cost of learning the language in exchange for increased productivity later.
EDIT: consistency, discoverability, and user-friendliness are all important. But those are all as part of productivity, where productivity is optimized for people who have already spent a decent amount of time learning the shared language; that is to say that terseness, consistency, and discoverability all work together. This is why sed syntax is not so terse as machine language, because sed is still designed to be used by humans.
- majkinetor 7y agoThats irrelevant observation since Powershell has both terse and short variants.
- moontear 7y agoNo, it doesn't. PowerShell has aliases like `cls` for `Clear-Host`, but no "short variants". Maybe this is a bit nitpicky, but wording is important since aliases should for example not be used in scripts as they may be changed, hence you should always use the terse or complete commands.
- majkinetor 7y agoYes it does. Its not only about aliases but number of other mechanisms such as shortening of parameteres to unique substring, parameter aliases, proxy functions, pipeline vars, pipeline properties, default global properties etc. All those together enable short variants. > Aliases should for example not be used in scripts as they may be changed Nonsence. Default aliases din't change at all from v2 - v5, they changed a bit by necessity with pwsh (v6), and cmdlets can and do change, and changed more then aliases (particularly with v6, especially network). Using full name doesn't guarantiee more stable script then using aliases, you need to use full qualified cmdlet name to have that which is not something anybody uses.
- pjmlp 7y agoOn the contrary, that is exactly why terseness is an anti-feature. Most of the stuff only gets written once, and is read multiple times across the years from team members and external consultants with different degrees of skill levels. Automatically completion on CLI and IDEs have solved the "too many letters" problem for decades now.
- earenndil 7y agoAgain, this is why user-friendliness and consistency are important. Terse code should still be easy to read. It should be easier to read than the equivalent less-terse code, since there is literally less visual material that you have to parse. It's a language; you have to learn it.
- skinnymuch 7y agoIt seems like what you’re saying makes terseness seem worse. If you’re only writing once as you say, then the terseness will make any debugging or going back to the code much harder. The only gains you’ll get are the minimal speed gains with terse names.
- earenndil 7y agoSee my reply to the sibling - https://news.ycombinator.com/item?id=21304987 https://news.ycombinator.com/item?id=21304987