[squeak-dev] [Pharo-dev] Pragma keyword / selector / methodSelector

Eliot Miranda eliot.miranda at gmail.com
Wed Nov 16 16:52:49 UTC 2016


Hi Tobias, Hi Denis,

On Wed, Nov 16, 2016 at 7:00 AM, Denis Kudriashov <dionisiydk at gmail.com>
wrote:

> You force me to search archives. I hope anybody else does this :).
>
> Here is good answer why pragma instead of annotation:
> http://forum.world.st/Pragma-support-in-Squeak-Pharo-Cuis-
> td3243836.html#a3245226
>

Thanks.  Igor gets to the technical justification; method
annotations/pragmas/those funny things in angle brackets *can* tell a
compiler to do things and yes, Tobias, you're right, they *are* also
metadata.

The /real/ answer as to why we should use Pragma rather than
MethodAnnotation is explained by Wittgenstein; we use words to mean what we
want them to mean.  Pragma is now a term that has been used for the
Smalltalk scheme for nearly twenty years.  We had a discussion several
years ago, even before the thread Denis references, where we agreed that
MethodAnnotation was a better name but the effort to make the change was
too great for almost all of us (myself included) and so we fell back into
using Pragma, and when we write the idea up this year and I presented it at
ESUG I went back to using Pragma.  It's shorter, and it means what we want
it to mean, which is whatever is between those angle brackets, and whatever
we make our compilers to on recognising them.

While the name Pragma may not be a perfect name, it does refer exactly to
what we have, and it is short, and it is current.


> 2016-11-16 15:46 GMT+01:00 H. Hirzel <hannes.hirzel at gmail.com>:
>
>> On 11/15/16, Denis Kudriashov <dionisiydk at gmail.com> wrote:
>> > 2016-11-15 21:58 GMT+01:00 Tobias Pape <Das.Linux at gmx.de>:
>> >
>> >> Here's my 2ct:
>> >>
>> >> 1. Pragmas aren't actually pragmas. They do not instruct the compiler
>> to
>> >> do things (_except_ for primitive: and apicall:, but these are now
>> >> outliers).
>> >>    They rather add metadata to a (compiled) method.
>> >> 2. The 'thing' (ie, class) should probably be named
>> >>         MethodAnnotation
>> >> 3. We can have the cake and eat it to:
>> >>
>> >>         Rename Pragma -> MethodAnnotation.
>> >>         Make Pragma a new subclass of MethodAnnotation.
>> >>         Make MethodAnnotation implement
>> >>                 #methodSelector
>> >>                 #annotationSelector (or #selector, if it must be)
>> >>         Make Pragma implement
>> >>                 #selector
>> >>                 #keywords
>> >>
>> >
>> > I remember long discussion about Pragma vs Annotation name where Igor
>> won
>> > completely :)). Conclusion was that Pragma is a right name.
>>
>> Is there a summary of this discussion available?
>>
>> --Hannes
>>
>>
>
>
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161116/74c5ef28/attachment.html>


More information about the Squeak-dev mailing list