Hi Ben,

2015-02-06 16:03 GMT+01:00 Ben Coman <btc@openinworld.com>:


On Fri, Feb 6, 2015 at 5:58 PM, Thierry Goubier <thierry.goubier@gmail.com> wrote:
Hi Eliot,

maybe I'll frame the core question a bit differently, thanks to your explanations.

I see pragmas used mainly for two things:

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.


btw, I just used a pragma to solve this issue of getting correct debugger behaviour for halting and stepping over #halt statements [1].� There seem about a dozen methods that can cause a #halt spread between Object and Halt classes which should all behave similarly, so the options would seem
* hardcode all these methods either into to check for in Halt>>signalerContext (or into a helper method called from #singalerContext)
* have a convention for a certain protocol to hold these methods, which Halt>>signalerContext can look up (except currently the methods on Object are an extension protocol)
* tag each such method with a pragma.� This simplified the solution a lot.� The search of the call stack just asked each method if it had the <debuggerCompleteToSender> pragma.

Yes, I agree with your assessment. Solution 2 require multiple protocols for a single method to be extensible, and this usage is perfect for metadata associated with the method.
I think discoverability is an issue with pragmas.� From Nautilus you can't "see" which methods contain which pragmas.� I wonder if one solution for this would be for pramga methods to be grouped under a <virtual-protocol> in the third pane of Nautilus.


The good old finder has a pragmas search mode which allows for a bit of discoverability (pragma users), but it doesn't link to the code exploiting the pragmas.

Do you know if we have something specific on SmartSuggestions for pragmas?

Thierry