lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



* On 2006-11-30 Javier Guerra <javier@guerrag.com> wrote  :

> On Thursday 30 November 2006 10:40 am, lua@zevv.nl wrote:
> > For my application, I'd like such an expression to return a nil
> > value instead of generating an error. Would it be possible to create
> > such a
> 
> what you're asking is basically that:
> 
> nil [anything]  => nil instead of an error.  I'd add this one too:
> 
> anything [nil]  => nil
> 
> currently both forms generate an error, and there's very little hope
> that it may change.

I am absolutely not asking anything to change in the default behaviour,
which seems perfectly ok to me. I am just wondering if there is a way to
change this behaviour for this specific table by clever usage of
metatables e.g.



-- 
:wq
^X^Cy^K^X^C^C^C^C