Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
masklinn
on March 7, 2015
|
parent
|
context
|
favorite
| on:
My Weird Ruby
Javascript iteration primitive isn't block-based.
picks_at_nits
on March 7, 2015
[–]
Ruby iteration primitive isn’t block based, either.
masklinn
on March 7, 2015
|
parent
[–]
Of course it is. `for a in b` desugars to `b#each`, not the other way around.
picks_at_nits
on March 7, 2015
|
root
|
parent
[–]
How do “while” and “until” desugar? Kernel#loop?
chrisseaton
on March 7, 2015
|
root
|
parent
[–]
Those are two rare exceptions and you're right they don't desugar.
picks_at_nits
on March 7, 2015
|
root
|
parent
[–]
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.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: