4 ms·
> Once something like generics are added The <> notation in id<T>(item for generic bracketing is harder to read than other bracketing symbols, e.g. () [] and {
by vorg 12y ago
> Once something like generics are added
The <> notation in id<T>(item for generic bracketing is harder to read than other bracketing symbols, e.g. () [] and {}. Unlike those others, angles are used for comparison ops and arrow heads also. If Go ever introduces generics, the Scala-like [] notation looks cleaner and would fit into Go's existing grammar.
- seanmcdirmid 12y agoYes please. You'd also avoid some icky non determinism in your parser.
- nanofortnight 12y agoThe only point of confusion I can see out of using [] is: type Foo[T] T versus type Foo []int for example. type Array[T] []T