On May 12, 2019, at 06:55, Jesper Louis Andersen 
<jesper.louis.ander...@gmail.com> wrote:
> 
> I don't think there are developers who find it unreadable once they know the 
> logic of that operator. However, if you don't know the rules, then it looks 
> like black magic.
> 
> In large software developments, consistency beats convenience almost all the 
> time. You can somewhat easily add another developer, if the notation rules 
> are consistent. Whereas clever notational convenience costs for every 
> developer you add to the project. Giving people a choice means you have yet 
> another section in your style guide to understand and maintain.
> 
> The deeper observation is that in a language with two syntactic classes, 
> statements and expressions, you can opt to have an if-like evaluation in the 
> expression class, or you can omit it. Go does the latter, where C does the 
> former. Of course, you can also define your language with a single syntactic 
> class. In that case, the above example can be written
> 
> let color = if temperature > 80 then "red" else "green" in ...
> 
> This style is used in a large selection of languages, which people often call 
> "functional languages". Though the lines of when something fits into the 
> moniker is somewhat blurry.

As it happens, I did get to ask Ken Thompson about his reasoning when he 
presented at VCF East last weekend.

Ken said, as close to verbatim as my week-old memory gets, that they were “too 
hard to compile right without the possibility of introducing subtle bugs”. I 
didn’t press further, because there were plenty of people in line to talk to 
him and I didn’t want to be rude; my assumption is that he was talking about 
either order of expression execution, or the difficulty of lumping the 
subexpressions together. He definitely didn’t have anything to say about their 
potential for abuse or about them being confusing to new programmers, but then 
we also didn’t talk long.

Just adding that since I said I’d ask about it a few weeks ago.

BTW, the video of his keynote chat with Brian Kernighan is not to be missed; I 
was working the audio, so sorry about Brian’s levels, but he was feeding back 
so I couldn’t turn him up any louder: https://m.youtube.com/watch?v=EY6q5dv_B-o


- Dave

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/4EF0A6BE-E1A6-4844-A297-07BE31BA07A9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to