Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We still have "fn". :)


..and since you're freeing up ~, you can now rename 'fn' to it. Rust criticism would drop to nearly zero, because everyone would focus in on your crazy function-defining-tilde and those people just don't get it.


fn is my favorite keyword for function definition. "function" is too long. "def" doesn't say anything about functions (unless you read it as DEfine Function). "func" sounds too funny. "defun" always reads "defunct" to me.

And just out of curiosity, where did the rust designers get the inspiration for "fn"? I know plan 9 rc and clojure have "fn". Or maybe it's independent invention?


Well, I slightly prefer "fun", but the Rust community pretty firmly favors "fn", and they're about the same anyway.

As far as I know it came from ML.


"fun" is even funnier than "func"!

ML etymology sounds pretty plausible (I didn't know ML uses fn) since I can see there is a strong influence of ML on Rust.


Anonymous functions in ML, possibly.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: