> > > On 05.12.2014, at 00:49, Dan <dnorton@mindspring.com> wrote:
>>> I'm interested in how to dynamically compile a class method.
It's easy (Thanks, Stephane):
You can invoke directly the compiler
for example in Pharo (there is a nice pharo-user mailing-list)
you can do
MyClass compile: ‘myMethod ^ 42’
and you method is compiled and added to the class.
You can also create a class doing
Compiler evaluate: 'Object subclass: #Box2
instanceVariableNames: ''height width''
classVariableNames: ''''
category: ''AABox’''
- Dan