On Wed, Jul 15, 2020 at 10:47 AM Nick Craig-Wood <n...@craig-wood.com>
wrote:

> In my mind the use of [ ]  clashes horribly with the array declaration
> syntax. When I see [int] in particular my brain says, ah array declaration
> of size int, what, no wait...
>
> This makes [identifier] mean two different things depending on whether
> indentifier is a const integer or whether identifier is a type. I think the
> suffix Vs prefix makes it unambiguous but I'm not sure.
>
>
You could make roughly the same argument in a lot of places in the
language, e.g.:

The use of () clashes horribly with the expression declaration syntax. When
I see f(x) in particular, my brain says, "ah! An expression!, what, no
wait!"

This makes (Expr) mean two different things depending on whether it is used
to disambiguate the expression AST or in a function call!

-- 
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/CAGrdgiVJxJcdLyJ55xkEc3jh%3D%3DF4p5zFSn8_Z1BcE%2BBsK3DV8w%40mail.gmail.com.

Reply via email to