Is it ever ok to use _G?

The wisest programmer is the one who realizes that what matters is what works for you and your use case.

Nothing else.

If using _G efficiently solves a problem you are having without creating more problems than it solves… then using _G is the correct course of action.

Despite how evil others might pronounce it to be, at the end of the day, it’s just another tool in your belt.

82 Likes