On Fri, Feb 6, 2015 at 1:58 AM, Thierry Goubier <thierry.goubier@gmail.com> wrote:1- expressing a link to some metadata used by low level tools: compiler, C lang generator, etc... primitives for me are part of that. Kind of neat to see that unified.I see pragmas used mainly for two things:Hi Eliot,maybe I'll frame the core question a bit differently, thanks to your explanations.There's a third use that is, I think, the most powerful.� Maybe you see this as the same as 1, but I don't.� The method is a component to be included in some larger structure, e.g. it is an action method on a menu, or it is an implementation of a pane in an inspector.� The pragma is the message to be sent to the object that manipulates that larger structure to add the method to it.� This is how menu pragmas work in VW.� There is an object called a MenuBuilder.� To add a method to a menu (and which menu is described by the pragma) the menu builder sets the method as its current method and then performs the pragma.� The parameters in the pragma allow the MenuBuilder to add the method in the right way to the menu.� But the execution of the pragma is what actually adds the mehtod to the menu.� So its a combination of specification and execution.
I have no problem with your criticism of pragmas used for categorisation.� Method categories are already there and sometimes much more appropriate than pragmas.� For example, in the SPur bootstrap the methods to be added or modified in Spur are included in categories of SpurBootstrapPrototypes and its subclasses.� If there were pragmas in these methods then the pragmas would be copied into Spur, which is not at all what I want.� Instead I copy across the methods in the relevant categories.But this "not a complete solution" feels to me an unfair criticism.� Pragmas are what they are and they can do a lot.� But no part of the system does everything.� A system is composed of components.