Hacker News new | ask | show | jobs
by burntsushi 1201 days ago
Possibly. It's one of those things that is really difficult to know. It's easy to look at what the possible benefits are because the model is more technically precise, but it's much harder to think about what the possible negatives are. The "&uniq T" model might be more technically precise, but maybe it is also more technically impenetrable and adds just one too many things that newcomers struggle with. Then again, maybe the extra precision of the model would end up helping more than hurting.

It's really hard to say because of set of people for whom "&uniq T" would have helped more is non-empty. But what is the size of the set of people for whom "&mut T" actually helps more? I have no clue. But it could be large.

1 comments

It is interesting. When I was learning, I found “mut” way more confusing because it is less precise (it’s one level of abstraction higher, mixes “usual intent/goal” with “what does this keyword do”) so it added an extra layer that I had to mentally back out/elide every time I read the keyword.