Re:Bastion of the Turbofish (2020)
by tooltower on Friday February 05, 2021 @12:29AM
(#26033427)
It makes me wonder. If things went differently, and if Rusty always needed this syntax for generic parameters, would the consistency have made the syntax more palatable?
[ Parent
| on HN ]
As in, if declaring generics looked like `fn foo::<T>()` rather than `fn foo<T>`? I dunno, at think at that point you just stop worrying about adhering to the principle of making declaration resemble use.
I guess I was only thinking of types, where turbofish comes up. E.g. for declaring generics, like `struct Point::<T>`.
Re:Bastion of the Turbofish (2020)
by edflsafoiewq on Friday February 05, 2021 @01:53AM
(#26033819)
IMO no. I find even :: by itself unpalatable.