Trans wrote: >I just finished (are we ever "finished"?) an annotations system that is >being used by Nitro. Originally I created a class I called a Service >(bad name I know) to manage first class methods so I could annotate >them. It worked okay, but had a lot of overhead. Yet there was one >really bad problem: what about *reusable annotations*? You need to be >able to create annotations w/o necessarily having a method to attach >them to. > >I tried a VirtualService but it was even worse. To remedy I decided to >use Symbol instead since we typically use those to reference methods >(perhaps even better would be a sublclass MethodName < Symbol). >Unfortunately without a built in Binding.of_caller it's not very good >either :-(. So I ended up just storing them in a hash in the >class/module they belong to. > >Anyway, the point is that annotations are better if they can exist on >their own too --as _potental annotations_, if you will. Something to >consider. > >T. > > From the replies I got so far, it seems as though "clean solutions" involving method objects are too inefficient. Though I don't know why or even if it is so. Can you post some code showing your annotations addition you did for Nitro? Steve Tuckner > > > >