lua-users home
lua-l archive

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

Hi, too,

AdL> Those who are against OOP, as I was once against packages, should take
AdL> some time to think if the features they use are needed by other users.

Just to make it clear in advance: I am not opposed to OOP in Lua. I am
just opposed to one fixed style of OOP for Lua.

AdL> I think the saying "If you don't want to do something, just don't" fits
AdL> nicely here.

hehe, that's a nice example of turning someones argument against him
;-) But, on a more serious note: Roberto wrote that to justify leaving
something out of the language. You use it to justify adding something
to the language. The difference is, in the first case you end up with
lua, the latter case may get you something like ada.

I proposed a change to the reader some time ago, that would allow the
implementation of a proper macro system on top of lua, without an
external preprocessor, and it could be written in lua. Think scheme's
syntax-rules, but in a manner that would be somewhat easier to grasp.
This would allow for any kind of syntactic sugar you could think of.
As I understand it, the basics of this are already there in 5.1.

I think this would settle this argument for good, because then someone
could write an OOP system you can load at runtime, it will have any
syntac feature this person considers useful, but it need not intrude
the core language. And if someone else needs an OOP system with
different features, she can just go ahead and make it so. And if you
don't want to use one, there is none :-)

I think this would also fit the notion of a helpful meta-mechanism
very well.