On the contrary, I think the zeitgeist for the last 5-10ish years has been the opposite. "Verbose and explicit > Succinct and implicit".
I think python and golang are largely responsible for this kind of movement in recent years. Because of that, I find languages like Perl 6 to be a breath of fresh air.
That's interesting. I wonder if that's influenced by the languages we use, as they might have different cultures. I primarily work in Java, which is famously verbose.
Reading this discussion, I think one inescapable conclusion is that personal experience has a great influence on what people consider a desirable coding style. Among other things, people often infer something that isn’t actually there, because such an inference would hold in the programming language(s) or the more general programming model(s) they are familiar with.
For example, there’s a big thread about the three-way comparison function in this discussion. Lots of people don’t like nesting ?: syntax to implement the required behaviour as a one-liner, but the objections essentially seem to be about the syntax of the ternary-if operator in C family languages. In another language, with a more intuitive syntax for this behaviour that doesn’t look like operator soup, the underlying idea of testing a series of conditions in order and yielding a single output value based on the first condition that matches might be perfectly intuitive to those same people.
Someone else in that thread commented that using a switch statement with conditions rather than specific values was unwelcome because then the more general conditions might overlap. Again, that view seems to be based on what the keyword “switch” means in a lot of established programming languages. There are other languages with features that test a series of potentially overlapping conditions in order and act based on the first match, and perhaps that same person might not have had the same objection to the same behaviour if it didn’t come with the baggage of the term “switch”.
At this point, I personally wish I could concentrate more on the intent when I’m programming. For example, do we need an expression or a statement here, or are our conditions a set of mutually exclusive options or potentially overlapping? My ideal programming language today would provide ways to express differing intents with some — any — reasonable syntax, but with very clearly defined semantics. Whether a language uses semicolons or syntactic whitespace or Lispy parentheses has long since stopped mattering to me. But that’s the me who’s been doing this for a long time and got tired of debates about minor details because in the end they mostly don’t matter. A younger me, one in the early years of his programming adventures who hadn’t yet seen these discussions a hundred times before and didn’t yet think in the same ways, would probably have delighted in the language lawyering and syntactic quibbles in that thread, and would no doubt have had a strong opinion on each suggestion.
And that brings us neatly back to where we came in, because it means the properties of code that is clear and desirable to me today are very different to the properties that would have made code clear and desirable to me, say, twenty years ago. So if I were writing code today and trying to be as clear as possible, my target audience would be a huge factor in the choices I’d make.
I think the semantics of the language is also important.
A ternary operator in a C like language probably is frustrating because it's some magic that was just shoehorned into the language with no rhyme or reason behind it.
However, in a language like Perl 6, each magical operator has an intelligible semantic meaning behind it almost like a natural language. So when you mix and combine different operators, it starts to make sense to you. See this post for an example https://perl6advent.wordpress.com/2017/12/11/all-the-stars-o...
I think the semantics of the language is also important.
Yes. I suppose I’m arguing here that the importance of semantics is much greater than the importance of syntax. It’s not that syntax doesn’t matter, but these days I find myself much more concerned with what features a programming language offers than exactly what they look like.
A ternary operator in a C like language probably is frustrating because it's some magic that was just shoehorned into the language with no rhyme or reason behind it.
I’m not sure I can agree with that. The big difference between the ternary-if operator and if-else statements in the C family languages is that the former is used in expressions while the latter is used with statements. Sometimes that distinction is useful.
I think python and golang are largely responsible for this kind of movement in recent years. Because of that, I find languages like Perl 6 to be a breath of fresh air.