10 ms·
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 “mu
by zabatuvajdka 5y 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.
- brandmeyer 5y agoAn 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".
- arethuza 5y agoHow would you verbalize "=>" ? Edit: Fat arrow?
- brandmeyer 5y ago"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-patterns.html#match-arms https://doc.rust-lang.org/book/ch18-01-all-the-places-for-pa...
- arethuza 5y agoI 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.
- mdoms 5y agoI 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".
- vmladenov 5y ago“Goes to” is what Prof. Elsa Gunter teaches in the PL theory class at Illinois
- int_19h 5y agoSomething like (x, y) => x + y can be verbalized as "lambda of x and y producing x plus y".
- swader999 5y agoI 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...
- vegai_ 5y agoI find it hard to believe any language would be so silly as to call functions "functions" in actual code. Fn or fun or gtfo.
- zabatuvajdka 5y agoWhy 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 :)