lua-users home
lua-l archive

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


I have to defend my unified methods ;-)

Jay Carlson wrote:
>
> For instance, unified methods significantly changes the semantics
> of ":" away from being syntactic sugar,

The syntactic sugar becomes:

    x:y(a)

  is the same as:

    methods(x).y(x,a)

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?

Ciao, ET.