unambiguous = simplicity

145 views
Skip to first unread message

Jay Kay

unread,
Jul 16, 2020, 7:41:49 PM7/16/20
to golang-nuts
Which code snippet(s) in GO would be 100 percent unambiguous as generics:

a) [g]
b) {g}
c) <g>
d) «g»

Ian Lance Taylor

unread,
Jul 16, 2020, 7:48:19 PM7/16/20
to Jay Kay, golang-nuts
It's impossible to accurately answer this kind of question without
more syntax details, and it depends on what you mean by 100 percent
unambiguous, but it's fairly likely that under reasonable assumptions
the only 100 percent unambiguous syntax is (d).

Ian

Fino

unread,
Jul 20, 2020, 1:29:58 AM7/20/20
to golang-nuts
I am happy to vote for (e)  <:g:>

BR fino
Reply all
Reply to author
Forward
0 new messages