[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: :? syntactical sugar request
- From: Steve Dekorte <steve@...>
- Date: Mon, 9 Apr 2001 11:16:03 -0700
In Lua, if you want to send a message to an object, but only if that
method exists you can do:
if object.message then
object:message()
end
The equivalent in NewtonScript is:
object:?message()
I was thinking if lua had a hook for a ? look whose default behavior was
the same as a "." lookup but could be overridden, this syntax would be
easy to implement in lua...
Steve