[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: unified methods
- From: "Joshua Jensen" <jjensen@...>
- Date: Wed, 28 Nov 2001 12:00:29 -0700
> > function call. The LuaState distribution does this by
> introducing the
> > -> (like the colon but for method tables) and the :: (like
> a regular .
> > Period table lookup).
> That seems strange. Why is the double colon not the
> extension of the colon operator and the -> a version of the .
> (like in C)?
Just in case I was unclear:
table::function() passes no implicit self and would be the same as:
table->function() passes an implicit self and would be the same as:
That's all there is to it. The use of the :: and -> operator is just to
mask the methods(table) lookup.
I am unsure exactly of what you were asking, but the :: operator is like
the C++ :: operator and the -> operator is like the C++ . or ->