Pragma syntax

stéphane ducasse ducasse at iam.unibe.ch
Fri Aug 18 16:57:47 UTC 2006


>>> On the other hand, I would make a distinction between primitives and
> pragmas.
>>> Primitives are not pragmas. So they aren't like any other pragma,  
>>> simply
> because
>>> they aren't pragmas.
>>
>> I do model primitives as pragmas. I do love it. It completely makes
>> sense. It is done like this in 3.9 (except for FFI). It makes the
>> compiler much simpler. It nicely integrates with the tools.
>
> ok. You've convinced me,  I suspected that you would :)

Me too! Thanks lukas. Thanks andy for your nice exchange. I will this  
kind of discussion
where at the end I have learned or realized that I knew something but  
he was deep into
my mind and not clear enough.

While reading the thread I was thinking that what I like with pragmas  
is that
they are not macros. (I feel that macros is orthogonal with the  
syntax of Smalltalk
and could really open a big can of worms). :)

At the beginning when VW people introduced pragmas I was unconvinced  
and I hated
when vassili was using them to implement delegation in UI elements. I  
still hate the idea that
certain use of the pragmas can break all the tools with have and  
introduce a new semantics for delegation
(even if I like the way tweak use pragmas to register events. This is  
really nice so I'm somehow contradicting
a bit myself here but this is the feeling I get).
Now after working a lot with pragmas I really like them as a  
declarative registration mechanism
that I can dynamically query from within the language itself even  
interactively.

For example the menus in VW are an example of such a registration  
mechanism.

Stef





More information about the Squeak-dev mailing list