|
|
|
|
|
by gpm
201 days ago
|
|
This is like complaining that in C you can write a->b
(a->b)
(*a).b
((*a).b)
Being able to use disambiguated syntaxes, and being able to add extra brackets, isn't an issue.PS. The formatting tooling normalizes your second and third example to the same syntax. Personally I think it ought to normalize both of them to the first syntax as well, but it's not particularly surprising that it doesn't because they aren't things anyone ever writes. |
|
It's really not. Only one of my examples has the equivalent of superfluous parens, and none are dereferencing anything. And I'm not defending C or C++ anyways.
When I was trying to learn Rust (the second time), I wanted to know how to make my own types. As such, the macro `vec!` mentioned elsewhere isn't really relevant. I was using `Vec` to figure things out so I could make a `FingerTree`:
And so on...