One of the hardest parts of getting into Scala for me (coming from mostly Java and Python) was that the yield keyword means something significantly different from what it means in Python. This actually broke my heart early on, as Python's generators are one of my favorite features from any language.
Delimited continuations in 2.8 make up for it and then some, but they're much harder to grok, imo. Python's yield gets you 80% of the same benefits with about 20% of the brain bending.
Delimited continuations in 2.8 make up for it and then some, but they're much harder to grok, imo. Python's yield gets you 80% of the same benefits with about 20% of the brain bending.