Hacker News new | past | comments | ask | show | jobs | submit login

Scala and Kotlin let you achieve something similar, without requiring a dedicated `yield` keyword, as well as not introducing yet another type of function into the language... Personally, I always found the number of different types of function in Ruby to be bewildering.

Scala even allows multiple blocks to be passed in, used to good effect in the Cats effect `bracket` function, amongst others.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: