Re:Go generics may use square brackets [] not parenthesis ()
by lpghatguy on Tuesday July 14, 2020 @10:24PM
(#23840521)
You can see the trade-off made here in Rust. When parsing a type, Vec<i32> is no problem, but the constructor of that type (in an expression!) must be written Vec::<i32>::new().
This operator is affectionately called the "turbofish" and can often be avoided because of very good type inference.
This operator is affectionately called the "turbofish" and can often be avoided because of very good type inference.