On 28 Aug 2014, at 16:32, Marcus Denker <[email protected]> wrote:

> 
> On 28 Aug 2014, at 16:03, Camille Teruel <[email protected]> wrote:
> 
>> 
>> On 28 août 2014, at 15:58, Marcus Denker <[email protected]> wrote:
>> 
>>> 
>>> On 28 Aug 2014, at 15:54, Yuriy Tymchuk <[email protected]> wrote:
>>> 
>>>> 
>>>> On 27 Aug 2014, at 17:53, Camille Teruel <[email protected]> wrote:
>>>> 
>>>>> Hi all,
>>>>> 
>>>>> With Opal, if you want to customize how methods are compiled into a class 
>>>>> you can override #compilerClass on class-side:
>>>>> MyClass class>>#compilerClass
>>>>>   ^ MySpecialCompiler
>>>>> 
>>>> 
>>>> I’ve missed this feature. This is super cool!
>>>> 
>>> 
>>> There is now in addition #compiler, an instance, not the class.
>> 
>> Hum right... I should do the same thing with a #classSideCompiler then, 
>> right?
>> 
> yes… but when #compiler is set, it should be valid for both instance and 
> class side... 

or not: as it seems to never have applied to the class side, it should be fine 
to keep them
separate.

that is, #compiler applies to instance side, and a classSideCompiler applies to 
the class side
by default people only override the instance side one, but when needed, they 
can override the classSide one, too.

(e.g. when you do a DSL, you want to still have the #initialize on the class 
side be untouched smalltalk in most
cases).
        
        Marcus

Reply via email to