[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Undefined variables returning nil
- From: Petite Abeille <petite.abeille@...>
- Date: Wed, 20 Mar 2013 01:42:18 +0100
On Mar 20, 2013, at 1:07 AM, William Sumner <prestonsumner@me.com> wrote:
> One can't assume all programmers are perfect, especially non-professional ones exposed to scripting APIs in games. Certainly, none of us are perfect. Otherwise, we'd have no need for compiler errors.
Perhaps this is merely a simple divide between "Easier to Ask for Forgiveness than Permission" vs. "Look Before You Leap". Lua is firmly in the first camp.
In the meantime, feel free to turn any table into LBYL with:
superdupersafe = setmetatable( {}, { __index = function( self, aKey ) error( ( 'Undefined %q' ):format( aKey ) ) end } )
And, if you really feel strongly about any of this, roll your own version of Lua. Perhaps it will get some legs. Or not.
- References:
- Undefined variables returning nil, William Sumner
- Re: Undefined variables returning nil, Petite Abeille
- Re: Undefined variables returning nil, William Sumner
- Re: Undefined variables returning nil, Kaj Eijlers
- Re: Undefined variables returning nil, William Sumner
- Re: Undefined variables returning nil, Petite Abeille
- Re: Undefined variables returning nil, William Sumner
- Re: Undefined variables returning nil, Kevin Martin
- Re: Undefined variables returning nil, William Sumner
- Re: Undefined variables returning nil, Kevin Martin
- Re: Undefined variables returning nil, William Sumner