[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: The "Is nil present in a table" problem, ExtendingForAndNext (was Re: XMLRPC 0.0 for Lua)
- From: "Jay Carlson" <nop@...>
- Date: Wed, 28 Nov 2001 10:02:30 -0500
"Edgar Toernig" <email@example.com> writes:
> I have to defend my unified methods ;-)
I understand :-)
> Jay Carlson wrote:
> > For instance, unified methods significantly changes the semantics
> > of ":" away from being syntactic sugar,
> The syntactic sugar becomes:
> is the same as:
> To keep compatibility you may choose another operator for this.
> I.e. '::' or '->' but IMHO the ':' is the "method" operator and
> should access the method table.
> > and loses some of the "everything's a table" flavor of current Lua
> > object programming.
> HUH??? Why? Everything still is a table and the tag methods become
> table driven. Maybe you misunderstood something?
It feels like the difference between LISP1/Scheme and LISP2/CL. There are
now two namespaces you have to think about; one for use as data, and one for
use for function calls. Moving method invocation off ":" would at least
make that syntactically apparent to current users.
Look, I haven't made up my mind yet about unified methods. They offer a lot
of nice features that seem useful in day-to-day programming. But it's a
significant enough change that I need to think about it, a lot---because it
*is* an interesting and thoughtful proposal. In comparison,
ExtendingForAndNext is a very localized language change, and one that seems
like an oversight from the original language design.
Taste in language constructs is very personal.... :-)