News for hackers. Stuff that matters.
Re:My Weird Ruby by masklinn on Saturday March 07, 2015 @07:29AM (#9161685)
Of course it is. `for a in b` desugars to `b#each`, not the other way around.
Re:My Weird Ruby by picks_at_nits on Saturday March 07, 2015 @07:33AM (#9161694)
How do “while” and “until” desugar? Kernel#loop?
Re:My Weird Ruby by chrisseaton on Saturday March 07, 2015 @10:39AM (#9162008)
Those are two rare exceptions and you're right they don't desugar.
Re:My Weird Ruby by picks_at_nits on Saturday March 07, 2015 @11:45AM (#9162240)
Those are not “exceptions” to Ruby’s primitives, those are Ruby’s primitives. Things that desugar to methods aren’t primitives.

The thing is, they’re rare in practice for cultural reasons.