Hacker News new | ask | show | jobs
by zabatuvajdka 1753 days ago
I personally have language fatigue after playing with various languages over two decades.

The thing I hate about rust is abbreviated keywords like “fn” and “mut” because it sounds like fricken mutt. A function is a function not a fn, and is it really so hard to type “mutable”?

There’s more important things in life to worry about than rewriting codebases in language Z.

3 comments

An old habit of mine: Avoid symbol-speaking or abbreviation-speaking. I verbalize "fn" as "function" and "mut" as "mutable" the same way I verbalize "std::unique_ptr" as "standard unique pointer" and not "stid unique pooter".
How would you verbalize "=>" ?

Edit: Fat arrow?

"fat arrow" would just be symbol-speaking. Assuming you are referring to the match syntax in rust[1], I verbalize "PATTERN => EXPRESSION" as "on $PATTERN, do $EXPRESSION".

I don't read code in English, even though I'm a native speaker. So its kindof a silly question: this would only come up when walking someone else through the code. I internally read code using data-flow and control-flow graphs. The written abbreviation is just shorthand for a specific type of graph vertex (or edge).

[1] https://doc.rust-lang.org/book/ch18-01-all-the-places-for-pa...

I was more thinking of C# where "=>" is the closest thing I can think of to "function".

There is Func<T> - that's a delegate type.

I verbalise that as "goes to". In the case of, say,

  things.Select(thing => thing.Stuff);
I verbalise the brackets as "thing goes to thing dot stuff".
“Goes to” is what Prof. Elsa Gunter teaches in the PL theory class at Illinois
Something like (x, y) => x + y can be verbalized as "lambda of x and y producing x plus y".
I find it hard to believe any language would be so silly as to call functions "functions" in actual code. Fn or fun or gtfo.
Why not skip the keywords altogether and use an ACTUAL λ symbol. Funny thing we have UTF8 everywhere but no one uses it… People are still typing ASCII in markdown files, but there’s Unicode symbols to render tables and whatnot directly in a text editor… but here we are :)
I never understood the push for terseness in newer languages. Are there any IDE's or text editors today that don't do code completion? Code coloring helps too. Usability is improved with full words imo...