|
|
|
|
|
by masklinn
2229 days ago
|
|
> The planned const generics syntax is going to look pretty weird, because it builds on type generics. If Rust had chosen a different syntax for type generics, const generics might look less weird. Could you provide an example? Because I don't really see it, except by requiring that non-const generics also be explicitly annotated? |
|
AIUI, this is only because <> was chosen as the container for type arguments, and > is also a legal operator in expressions. So, for example, if Rust had used Scala-esque [] for type arguments, this would not be a problem.
[1] https://rust-lang.github.io/rfcs/2000-const-generics.html#ap...