[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Say No to global-by-default
- From: Gregg Reynolds <dev@...>
- Date: Wed, 4 Jul 2018 16:07:12 -0500
> This is a very bad idea. Global-by-default is a fact of life in Lua, and
> it will never change (I hope). You deal it with by practicing
> disciplined programming.
This is not a very useful advice when you deal with code written by
someone else. Global as default and similar things are *obviously* no
such big deal when you live in a vacuum and don't deal with other's
people code. Then you have to just apply good discipline and you're safe.
Unfortunately, based on some replies in this ML, it looks like many
people really don't understand problems that appear only when you have
experience from working with someone else's code, trying to understand
it, debug it or refactor...
Shrug. Fact of life with Lua. I don't think anybody is claiming this is not a problem. Just that it cannot be addressed in the manner proposed. You can't expect the language to protect you from badly written libs.
In any case, my guess is that the chances of Egor's proposal being adopted is somewhere in the vicinity of zero, so we're just having fun.