On Jul 15, 2020, at 12:13 AM, Ian Lance Taylor <i...@golang.org> wrote:
> 
> The disadvantage of guillemets is that they are hard to type on many
> keyboards.  So to me either square brackets or angle brackets would be
> better than guillemets.

Not to mention that, while Go *is* officially in UTF-8, the chance of an output 
device or editor mis-formatting something that isn't 7-bit ASCII is still 
reasonably significant even in 2020, and that has much graver consequences for 
delimiters than for, say, identifiers or string contents.  I'm curious about 
how screen readers react as well; I know we have one or two folks on this list 
who could probably offer some perspective there.

> The disadvantage of a two character sequence such as <: :> is that it
> is more typing.  So again either square brackets or angle brackets
> seem to me to be better.
> 
> An example of a reason that square brackets might be a poor choice
> would be ambiguous parsing, or cases where the code is harder to read.
> 
> It's true that some other languages use angle brackets, but Go already
> does many things differently.  That is only a minor advantage for
> angle brackets.  To me at least it does not outweigh the
> disadvantages.

I think square brackets do the job of visually disambiguating the syntax from 
the other uses of parentheses on the same lines well enough, and it sounds like 
with the "type" keyword they do the job well enough for the parser as well.  
Personally, I have no horse in the race for square vs. angle brackets (other 
than I think it would be foolish to do something technically infeasible or 
problematic just because it subjectively looks nicer), but then, I also like 
Objective-C's visual styling, so YMMV.


- 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/94FC42B1-ABD0-4E37-AE80-0B4313DC34C9%40gmail.com.

Reply via email to