4 ms·
Bikeshed or not, he's not the only one who doesn't like "fn" choice. The shortnaming choices aren't really consistent. IMHO, "fun" would be better. as box br
by hippiehippo 12y ago
Bikeshed or not, he's not the only one who doesn't like "fn" choice. The shortnaming choices aren't really consistent. IMHO, "fun" would be better.
as box break continue crate else enum extern false fn for if impl in let loop match mod mut priv proc pub ref return self static struct super true trait type unsafe use while
- ben0x539 12y agoI like fn a lot more than fun. fns are serious business! (and personally I have a hard time dealing with abbreviations that are themselves actual words, fn stands out more) fwiw, continue and return used to be cont and ret, match used to be alt, crate used to be not a keyword iirc.
- bjz_ 12y ago> The shortnaming choices aren't really consistent It's historical. Rust's keywords used to be far more short on average - I think the rule was no more than 5 characters.
- pcwalton 12y agoOn the other hand, it is Huffman-coded: "fn", "impl", and "mod" are quite common, compared to, say, "continue", which is rare.
- curtis17 12y agofn bugs me as well. fun would have been better: - ML heritage for named functions (fn was anon) - muscle memory with the leading part of javascript function - the other abbreviations take the leading part of the word