News for hackers. Stuff that matters.
Re:"Useless Ruby sugar": Endless (one-line) methods by SideburnsOfDoom on Friday December 01, 2023 @11:18AM (#38488428)
C# has something similar, but uses the existing lambda syntax, with "=>" to the left of the body or expression, e.g.

int AddOne(int x) => x + 1;

or

void SetXToZero() => x = 0;

Re:"Useless Ruby sugar": Endless (one-line) methods by polygamous_bat on Friday December 01, 2023 @11:30AM (#38488600)
Exactly what I am talking about when I say use some other unambiguous token. = is so incredibly overused in a programming language, why give it even more jobs?