[Nitro] Concerns over Og mandating the form of initialize

James Britt james_b at neurogami.com
Thu Apr 14 12:28:23 EDT 2005

Anastasios Koutoumanos wrote:
> i think you're missing the fact that tstamp is just a class variable, 
> not a prop_* variable!

No, it's  an instance variable.  It's read-only, and not marked for 
persistence, as the whole point is that it gets instantiated by process, 
not client assignment.

> james is right in the fact that we should allow for internal class 
> variables to be persisted some way.

I do not want certain instance values saved, as they may be derived data 
or related to specific circumstances (such as the time a particular 
instance is created).

> but you're right saying that initialised should _not_ be used when 
> restoring an object from the backend.

I think there is confusion over the use of the word 'restore'.  If the 
idea is to revive a previously-existing object (similar in spirit to 
YAML.load( yml ), then do not call initialize.

If the the idea is use data (which may or may not have come from a 
previously existing object) to drive the creation of objects, then 
initialize may be needed because that is where internal state may set up 
and validity checks performed.

If I understand George, any such internal initialization  and state 
validation logic performed at object creation would have to be moved to 
another method that gets called by Og during og_read.


More information about the Nitro-general mailing list