I understand the problem with setting global variables before
subclassing but it seems like this is just a known 'ruby' thing for
programmers to handle themselves.

The subclassing behavior is a part of the ruby language and
programmers will be aware of it and able to handle it themselves. My
web app is heavy on subclassing and my current way of defining classes/
subclasses has been working well. I don't think this is really
necessary.

Xavier

On Jul 9, 6:33 pm, Jeremy Evans <[EMAIL PROTECTED]> wrote:
> On Jul 9, 3:04 pm, "Tamás Dénes" <[EMAIL PROTECTED]> wrote:
>
> > Manveru implemented traits for similar purposes in Ramaze. He uses it
> > everywhere. I don't know which has better performance.
> > You can look at it 
> > here:http://source.ramaze.net/#/lib/ramaze/snippets/object/traits.rb
>
> > Tamas
>
> It's somewhat similar, except it uses a global hash instead of a per
> class hash.  I don't like the idea of global hashes for storing
> information related the internals of objects, as I feel that it is
> best stored in objects themselves (object encapsulation).  In terms of
> performance, they aren't directly comparable, as his ancestral_trait
> returns a hash of all inherited traits, while the accessor methods I
> create return the value of a single attribute.
>
> Regardless, the implementation is not the issue.  The issue is whether
> it is important to support the functionality at all.
>
> Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to sequel-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to