Hacker News new | ask | show | jobs
by brandmeyer 1753 days ago
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".
1 comments

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