lua-users home
lua-l archive

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


I just found lua and tough I´m lovin it, something is
still missing. I find myself writin lots of code
similar to

object.name=object.parent.name..object.name

Theres a quite a load of repeating 'object' there..
Could there be a new command introduced to handle
this:

with object do
   name=parent.name..name
   end

This would clean up code a lot and make it more
readable imho.
As i understand similar behaviour could already be
done with setting the enviroment as 'object', but with
the downside of losing all the global functions etc.

I dont know if the idea im introducing has been
discussed or if theres a smarter way, but do you have
any toughts about this idea?


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com