lua-users home
lua-l archive

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


> I'm not much good at this OOP stuff. I think I was supposed to learn
> C++ many years ago, but I found that the size of C++, combined with
> its visual absurdity (aka unreadability), made me sceptical. The
> self-righteous tone of Mr Stroustrup's books (is it just me, or is
> his prose about as readable as Military Discipline Code?) just made

Don't know this book, but I agree about C++ unreadability.

> it harder for me to want to bother. So I am learning "modern" OO with
> Lua, 
> 
> I recently wrote a Lua function like this:

[snip]

> Ignoring the probably-crap use of sockets and mutices, and ignoring
> the ignorance of the coder himself....at leat from a syntactic point
> of view, I thought this was a model of clarity. "What is it about
> self that Sir does not find informative?"

You can call that personal taste. Having to explicitly inform the scope
of the variables I'm reading from/writing to is just an waste of key
hits. But that's just my point of view, and I'll try to address it with
setfenv like Adam suggested, at least until I can find another language
that has most nice features of Lua (maily small size and easy to embed)
*and* is OO.

Regards,

Andre de Leiradella