Personally, I'd like to see things implemented as in java, where you can define members of a class as (Java static), and they become "singletons" in that class, accessible without instantiating the class.
That, I imagine isn't a simple thing to permit (though, I've noticed that it's theoretically possible on the C-leve)l.
DiskChunk.pike:
something-not-static Database parent;
// can be called from the class directly. something-not-static set_parent(Database parent) { parent = this->parent; }
void create() { }
On Sep 18, 2007, at 11:25 AM, Per Hedbor () @ Pike (-) developers forum wrote:
I did too (specifically, i wished for a 'global' modifier). :-)
The reson being things like the above mentioned id:s, and code like this:
DiskChunk.pike // Let's say that we have 1000000 of these.. | | int hash; | DataBase parent; // 12Mb RAM goes *poof* here. :-) | | void create( DataBase par ) { parent = par; } | // .. code using variables above ..