thisCompiler special variable

Stephen Pair spair at advantive.com
Wed May 24 21:07:01 UTC 2000


> ...I am currently using such a partial evaluator for my AOP weaver. That's
> why I wrote it. Let me know if you'd like to test drive it.

Yes!  Also, could you give us an example of what such a method would look
like?  Or, do you mean that full partial evaluation will automagically
evaluate anything that can be fully bound at compile time?  Seems like that
would produce some non-obvious compile time behavior.  Also, what if I don't
want stuff evaluated at compile time?  Seems like you would still need some
way of identifying such sections in the source code.

Would the ##() notation be appropriate here?  Things contained within ##()
would be partially evaluated:

##(Debug ifTrue: [1+1]) "embeds a literal 2 if debug is true"
##(Debug ifTrue: [Transcript show: self printString]) "embeds the debug
statement if debug is true"

Is this what the other implementation do?

- Stephen





More information about the Squeak-dev mailing list