[Guido] > If I had known Scheme 15 years ago I might have considered this -- > ... Yes, but you would have rejected it in favor of Python's original 3-level scoping then anyway. That was an experiment worth trying! What you would have learned from Scheme 15 years ago is that combining nested scopes with indefinite extents is: - subtle - the subtleties are crucial - intent can't be guessed So Scheme did a very Pythonic thing here, requiring the programmer to identify intended scope explicitly (Scheme never guesses about this -- there are no inferences about intended scope, only explicit scope declarations). Python didn't need that for its original scoping scheme, and it was no sin then to leave it out. The more Python tries to accomodate delayed code blocks (generator expressions are an instance of that, and it's not the "generator" part that's creating the problems), though, the more users will struggle with the lack of explicit scoping. The "delayed binding" guess usually works in the simplest examples (but so does the "early binding" guess), while nested "let" blocks are usually absent in the simplest Scheme functions. People never leave well enough alone, though, so I hope generator expressions don't become another "minor convenience" that's viewed as a "minor annoyance" a year later.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4