[Nitro] Concerns over Og mandating the form of initialize

Anastasios Koutoumanos ak at navel.gr
Tue Apr 12 11:45:00 EDT 2005

James Britt wrote:

> George Moschovitis wrote:
>> Hmm, I am not sure, how to integrate this code snippet in Og.
>> Can you please explain this a little bit better? I 'll also try to
>> think on this later today (very difficult to work on nitro/think in
>> the office).
> In the assorted Og adapters, when read_all is called, the code 
> instantiates an instance of the serialized object, the calls 
> obj.og_read (which sets object properties)
>  res.each do |row|
>   obj = klass.new
>   obj.og_read(row)
>   objects << obj
>  end
> Perhaps this could be replaced with something that first tries to 
> populate the object by passing a block to klass.new.

Now, that's a great idea, I think it's straight-forward to implement. 
The only issue that may arise is a performance penalty for  first trying 
to pass the block and then fall back to the original techique. Since 
nitro is for speed (among other things), we should "join forces" for 
using the right way of implementing your idea, minimizing this 
performance penalty.


> James
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050

Have fun: www.joy.gr/  and create: www.navel.gr/nitro

More information about the Nitro-general mailing list