Advertisement
Advertisement
β‘ Community Insights
Discussion Sentiment
0% Positive
Analyzed from 377 words in the discussion.
Trending Topics
#features#syntax#terse#notation#used#effort#rule#expression#explicit#established
Discussion Sentiment
Analyzed from 377 words in the discussion.
Trending Topics
Discussion (8 Comments)Read Original on HackerNews
You can introduce a notation that's terse without problem, so long as it's comprehensible when encoutered. Example: the (!Β·!) operator (which I just made up), which can be placed around any expression to log the value of the expression to STDOUT. Its value is the same as the expression (so `(!3+7!)` equals `10`).
* For new features, people insist on LOUD explicit syntax.
* For established features [that turned out to be used disproportionately often], people want terse notation.
So, I argue, it's not really people getting used to the feature that allows it to be terser. It's that enough time passes that you figure out what features are used enough that they warrant the terse syntax (like the Rust example he gave).
It's a form of selection bias: there are many other established features that are rarely used and left with a verbose syntax but you don't notice them later because, well, they're rarely used.
"The principle of least effort is another possible explanation: Zipf himself proposed that neither speakers nor hearers using a given language want to work any harder than necessary to reach understanding, and the process that results in approximately equal distribution of effort leads to the observed Zipf distribution.[5][31]" -- From: https://en.wikipedia.org/wiki/Zipf%27s_law
"Explicit syntax" would initially be less cognitive effort. Soon that effort would be gone and "terse notation" would lead to lesser typing effort.
https://news.ycombinator.com/item?id=13192052 - 16 December 2016, 73 comments
Your students will be mad right away if you teach them the terse syntax, but mad later if you teach them the verbose syntax.
For new features, people insist on LOUD explicit syntax.
For established features, people want terse notation.
The Golden Rule is the first. This is the second.
Nobody follows Hyrum's Law (also the second), they suffer from it inevitably applying to them.