On Thu, Aug 16, 2018 at 7:40 AM, Abe Dillon <abedil...@gmail.com> wrote: > Jumping into functions that mutate variables in the calling scope sounds a > lot like "GoTo" which is notorious for leading to code that's very hard to > reason about. Your functions would implicitly require that you assign > variables in the calling scope before calling the function instead of > explicitly requiring them in the function's signature. That can be very > confusing.
Drop the word "function" and it's no longer about a goto - it's about a block of code that can be deposited into another context. If you were to copy and paste that code, its meaning would be defined by where it is used; the idea of a "code block" is that you can do that with something that can be passed around like a function, but isn't a function. We could borrow a term from the Python grammar and call it a "suite", perhaps, but "code block" is probably the best term. As mentioned, there have been previous proposals along these lines. By the way: > It's difficult to see what you're after from your Verb and Morpheme example. You're responding to MY post, which is a response to Jacob's. Please watch your use of pronouns; it would help a lot if you weren't top posting, and were directly responding to specific people's specific comments. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/