lua-users home
lua-l archive

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


On Mon, 2008-06-30 at 13:09 +0100, Stephen Kellett wrote:
> Luiz Henrique de Figueiredo wrote:
> > What name would you expect for the table created by the code below?
> >
> >   a = {}
> >   b = a
> >   c = b
> >   a = nil
> >   
> I'm thinking about the cases for folks writing classes etc. Its clear 
> there are cases where a sensible autogenerated name isn't
> going to be easy (unless you just default to filename_lineNumber).

Then the class implementation can provide a method of obtaining this
information.  The built-in tostring() can't possibly know.

B.