At 1259312510 time_t, [email protected] wrote:
> I don't have the insight like you... But is there no way to replace the 
> function
> these functions use to access the property of an object with one that would
> use __index()? Surely there must be a (not too messy) way, is it not quite
> common usecase for inheritance?

There's a way, but I don't see why we would need it.
awesome just knows about its basic objects, it does need to call any
other method that you may have added to the basic class, or to a
subclass of a basic class.

> The userdata is just really awkward to work with in Lua, you'll end up
> needing to implement this and that in C to get what you need in Lua...

Well, no offense, but that's more than a feeling that any objective
point. You need to bring fact ang real arguments or criticize something
that is currently done in awesome, rather than "it's awkward". :)

> Yeah, it wouldn't 'reset' things. You'd define a function (or a set of 
> functions)
> that would be called automatically after the configs (default, and then
> custom) were loaded.

Why not.
Default config is probably the last thing I'll ever wrote for awesome,
because, seriously, everyone gotta have his own idea about it.

> I've thought about having modules too, but maybe its not needed, and 
> maybe it could case problems... some parts of the config are (or could
> be for some users) interconnected. It could cause problems too.

Again, you need real arguments and/or examples.

> Sure, I thought of that too, just didn't think its even worth mentioning :)
> I think all of the attributes should have defaults if possible, so that
> ideally constructor can have no arguments. But all properties should
> be settable through constructor as well as assigning a property
> afterwards.

I agree. That's how basic objects are implemented.

-- 
Julien Danjou
// ᐰ <[email protected]>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// There is nothing under this line.

Attachment: signature.asc
Description: Digital signature

Reply via email to