[Nitro] [ANN] Facets 1.4 RC1

TRANS transfire at gmail.com
Mon Jun 5 14:24:29 EDT 2006

On 6/5/06, George Moschovitis <george.moschovitis at gmail.com> wrote:
> Have you added the symbol of the annotated attribute in the annotation
> as I asked you some days ago?

I did look at that, but I haven't come to a conclusion. My frist
impression is that it may be a problem. An Annotation is an
independent object, so technically it could be reused. While I doubt
anyone is using it in that way, if we tied the name to it then it
certainly could not be used that way.

What do others think? Is it reasonable to think that one Annotation
might be shared between more than one method/symbol/name? Or should
there be a strict one-to-one relationship? Personally I lean toward
keeping it open though I may be totally off base.

Hmmm... If I am not totally off-base then there may be another way to
solve the issue. The problem is with passing around an Annotation but
also having to pass the name along with it, right? I can see how that
doesn't seem very DRY. Perhaps using something like an Association
would be useful?  "pass( the_name >> the_ann )" But probably better
would be creating a delegating class. Also, I wonder, do you ever have
to pass the object or class the annoation is for? If so then a
delegator might really be the way to go.

  class AnnotatedItem( name, klass, annotation )

And I should be able to add a method to annotation.rb that would
return one of these just by providing the name from with in the
context of the class. I.e

  class X
    annitem( :foo )

Would that work for you?

Sorry, if this issue is holding you up. Lets work on it and find a
good solution.


More information about the Nitro-general mailing list