3 ms·
Why couldn't they have used "func" for functions, like so many languages do, instead of "fun"?
by curyous 10y ago
Why couldn't they have used "func" for functions, like so many languages do, instead of "fun"?
- richard_todd 10y agoI don't think of 'func' as a standard. Off the top of my head, you can see "defun", "fn", "def", "function", and on and on in various languages. I don't see much agreement across the board.
- netcraft 10y agodoes anyone know of a place that compares syntax like this across languages? I've found myself often wondering if there is consensus for certain features or syntax.
- richard_todd 10y agoNot exactly, but on rosettacode.org (http://rosettacode.org/wiki/Rosetta_Code http://rosettacode.org/wiki/Rosetta_Code) you can see tons of languages implementing the same toy programs, so they will often be using comparable language features in the process.
- chocolateboy 10y agohttp://rigaux.org/language-study/syntax-across-languages.html#FnctnFnctDfnt http://rigaux.org/language-study/syntax-across-languages.htm...
- cdelsolar 10y agoBecause it's fun.
- dalailambda 10y agoIf using 4 wide space/tabs, the function body will line up with the function name when using "fun". Maybe not the reason, but it is a reason.