Am 20.09.2014 um 16:44 schrieb Ben Coman <[email protected]>:

> In consideration of Issue 11880, I wanted to better understand the concept of 
> pragmas and how they are used in Pharo. 
> "Pragmas" seem to be used in other languages to provide "compile time" 
> directives, but Pharo seems search for pragmas at runtime, for example to do 
> things like build menus.  Mostly I'd consider menus fairly static (with any
Pharo’s pragmas are more like annotations (e.g. in Java).

> dynamism statically defined).   In Issue 11880 adding a few caches brings 
> menu generation from 80ms down to 5ms - but then there is the complexity of 
> resetting them when the code that defines them changes. 
> So I wonder... can/do pragmas cause actions at compile time, like setting a 
> class variable to nil when a method is compiled?  That seems a good way to 
> reset a cache whose builder uses that method, but maybe there are problems I
I bet you can do that. All you need is to change the compiler accordingly :D

> don't see?
> 
> https://pharo.fogbugz.com/default.asp?11880
> 
> cheers -ben
> 
> 
Regards
Andreas


Reply via email to