+1. I can't stress enough how useful it is to make pragmas real selectors with implementations and to try and apply them using perform:withArguments:. That's when their real power comes in.

For example, if you have some method that wants to be added to some tool, make its pragma a message with all the information you need to add it as arguments (things like its position or priority relative to other additions, its name in the list of components, an icon to use, a string for fly-by help) and then implement a builder class whose methods match these pragmas so that when the builder performs the pragma it adds the method to the tool, in a given position, with a given icon and fly-by help etc.

In most other systems method annotations are simply that, just passive labels. But in Smalltalk these are executable. You can browse for senders and implementors, you can execute them using a visitor pattern. Much more powerful.

Hi eliot

For the pragmas paper I read about annotation in Java and from what I learned they are more powerful in Java. They can annotate any language elements and they can also be executed (I have to discuss with a Java expert to get it).

Stef

Reply via email to