[squeak-dev] Re: Pragma support in Squeak/Pharo/Cuis

Andreas Raab andreas.raab at gmx.de
Fri Jan 28 14:21:46 UTC 2011


On 1/28/2011 2:07 PM, Igor Stasenko wrote:
> On 28 January 2011 13:59, Juan Vuletich<juan at jvuletich.org>  wrote:
>> You mean "method annotations" right? ('Pragma' has a completely different
>> meaning in the language / compilers that use them, and is a very bad name
>> for this).
>>
> Is this sarcasm? yeah?
> This naming used for years, and now it became not simple bad, but
> _very_ bad name :)

Hardly. Juan is absolutely right that a pragma is a _very_ bad name, 
something very specific, namely an instruction to the compiler to do 
something. Therefore, all pragmas are annotations but not all 
annotations are pragmas. For example <primitive: 123> is a pragma (it 
instructs the compiler to generate a primitive) but <hello: 'world'> is not.

>> Cuis doesn't currently support method annotations.
>>
>
> huh... how then you specifying a primitive(s) in method? and FFI?
> or in same way you can say.. yeah this is not pragma , its a primitive..
> but it doesn't makes any difference.

It does. Juan is exactly right, Cuis supports pragmas (<primitive:> or 
FFI calls) but not annotations.

> You may call it  'a method's meta-data' or any other way you like it,
> i _dont_ care!
> As long as the idea behind is will remain same.

But the idea _isn't_ the same. The idea of pragmas is to instruct the 
compiler to do something specific. The idea of method annotations is to 
provide additional information in methods that isn't executable.

In other words: Pragmas are "understood" by the compiler, method 
annotations are not.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list