3 ms·
As the IDEs for Rust becomes more powerful, the name length issue will probably go away. I get terseness, but there is a balance. I am definitely in the camp of
by bluejekyll 10y ago
As the IDEs for Rust becomes more powerful, the name length issue will probably go away. I get terseness, but there is a balance. I am definitely in the camp of expressive naming, as it reduces confusion.
In fact, I find myself waffling on generic names as well, T is common, but when you get up to 3 or 4 generics in a function, it starts looking like more expression is needed. Though I still use single or double characters, I do think about changing my mind here.
- sitkack 10y agoMaybe there needs to be an idiom where T is generic, requiring little or not traits on it. N,M,... is a numeric type thing, S,T,U,.. is a container type thing. When one starts to get multiple generics in a function, usually they interact in some way, what names we should give them to describe that interaction, I don't know. Naming is hard, naming in generic code is x^y harder.