Hacker News new | past | comments | ask | show | jobs | submit login

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



On the other hand, it is Huffman-coded: "fn", "impl", and "mod" are quite common, compared to, say, "continue", which is rare.


I 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.


> 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.


fn 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: