lua-users home
lua-l archive

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


On Mon, Dec 17, 2012 at 9:57 AM, Coda Highland <chighland@gmail.com> wrote:
> obj:set{enabled=true}
> Of these variations, Java-style is the shortest. :P

Ah, but Dirk-style can set multiple properties in one go:
obj:set{enabled=true,visible=true,name='Frodo'}.

> I feel like there's got to be a good way to simplify this no matter
> what method you're using.

Thinking of upgrading Microlight's simple class mechanism to support
properties, with as little fuss as possible.

You do know that one of the endless style wars in Java-land is
'getters are bad'.  Because they think it's just a tedious way to
write a struct, and structs are not classes. Fortunately we work in a
less dogmatic language community that isn't obsessed with sniffing
other people's code for 'code smells' ;)

steve d,.