Pragmas/Annotations for classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Pragmas/Annotations for classes

Guillermo Polito
I didn't understand if you want to replace the class pragmas with a simple class method for adding metadata, or to add the pragmas in a class method.

In the first case I think I would like to have class pragmas because:

- we can have a single, well known way, or concept, to generate metadata, which can allow us to:
- build tools that can work with class and method pragmas in the same way (not only frameworks, a pragma browser can be benefited by this).

If the metadata is disperse we have to know a lot of ways to do the same, or each one will define it's own.  And we can't (or it should be difficult to) have tools to work with that metadata uniformly.

I don't know why this should be less cheaper than a class method.  I don't think this is reaaally hard to do also... :S.  It's even simpler than the method pragmas, because we don't have to change the compiler :P.

Cheers,
Guille

On Fri, Jul 9, 2010 at 9:25 PM, <[hidden email]> wrote:
Stef,


Just to have a better grasp of your reasoning: Are you suggesting we put annotations in a method and just have it/them lumped in an 'Annotations' protocol or are you suggesting a more radical change which will require the toolset to have changes in sync to them?




Em 08/07/2010 11:48, Stéphane Ducasse < [hidden email] > escreveu:
May be using a class method?
But yes this would be important.

Alex if we use comment we would have to parse them and this is not good.

Stef

On Jul 8, 2010, at 3:35 PM, Torsten Bergmann wrote:

> Hi,
>
> while it is possible to annotate methods using Pragmas,
> what about classes?
>
> Thx
> T.
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pragmas/Annotations for classes

Stéphane Ducasse
In reply to this post by csrabak
I just said that we do not need a big infrastructure. We have methods / class methods and pragma so it should
be enough.

Stef

On Jul 10, 2010, at 2:25 AM, [hidden email] wrote:

> Stef,
>
>
> Just to have a better grasp of your reasoning: Are you suggesting we put annotations in a method and just have it/them lumped in an 'Annotations' protocol or are you suggesting a more radical change which will require the toolset to have changes in sync to them?
>
>
>
>
> Em 08/07/2010 11:48, Stéphane Ducasse < [hidden email] > escreveu:
> May be using a class method?
> But yes this would be important.
>
> Alex if we use comment we would have to parse them and this is not good.
>
> Stef
>
> On Jul 8, 2010, at 3:35 PM, Torsten Bergmann wrote:
>
>> Hi,
>>
>> while it is possible to annotate methods using Pragmas,
>> what about classes?
>>
>> Thx
>> T.
>> --
>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pragmas/Annotations for classes

Stéphane Ducasse
In reply to this post by Guillermo Polito
Hi guille


> I didn't understand if you want to replace the class pragmas with a simple class method for adding metadata, or to add the pragmas in a class method.
>
> In the first case I think I would like to have class pragmas because:
>
> - we can have a single, well known way, or concept, to generate metadata, which can allow us to:
> - build tools that can work with class and method pragmas in the same way (not only frameworks, a pragma browser can be benefited by this).
>
> If the metadata is disperse we have to know a lot of ways to do the same, or each one will define it's own.  And we can't (or it should be difficult to) have tools to work with that metadata uniformly.

Did you check setting?
Did you check how pragma collection is done?
Because it can help me to understand your answer.


> I don't know why this should be less cheaper than a class method.  I don't think this is reaaally hard to do also... :S.  It's even simpler than the method pragmas, because we don't have to change the compiler :P.
>
> Cheers,
> Guille
>
> On Fri, Jul 9, 2010 at 9:25 PM, <[hidden email]> wrote:
> Stef,
>
>
> Just to have a better grasp of your reasoning: Are you suggesting we put annotations in a method and just have it/them lumped in an 'Annotations' protocol or are you suggesting a more radical change which will require the toolset to have changes in sync to them?
>
>
>
>
> Em 08/07/2010 11:48, Stéphane Ducasse < [hidden email] > escreveu:
> May be using a class method?
> But yes this would be important.
>
> Alex if we use comment we would have to parse them and this is not good.
>
> Stef
>
> On Jul 8, 2010, at 3:35 PM, Torsten Bergmann wrote:
>
> > Hi,
> >
> > while it is possible to annotate methods using Pragmas,
> > what about classes?
> >
> > Thx
> > T.
> > --
> > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [hidden email]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pragmas/Annotations for classes

Guillermo Polito
Haha yeah :).  I only was telling that if we chose a non-pragma way to add metadata to a class, we cannot be benefited (simply) with a pragma collector, hehe.

But that's because I didn't understand what you meant about using class methods to add metadata.

On Sat, Jul 10, 2010 at 4:46 AM, Stéphane Ducasse <[hidden email]> wrote:
Hi guille


> I didn't understand if you want to replace the class pragmas with a simple class method for adding metadata, or to add the pragmas in a class method.
>
> In the first case I think I would like to have class pragmas because:
>
> - we can have a single, well known way, or concept, to generate metadata, which can allow us to:
> - build tools that can work with class and method pragmas in the same way (not only frameworks, a pragma browser can be benefited by this).
>
> If the metadata is disperse we have to know a lot of ways to do the same, or each one will define it's own.  And we can't (or it should be difficult to) have tools to work with that metadata uniformly.

Did you check setting?
Did you check how pragma collection is done?
Because it can help me to understand your answer.


> I don't know why this should be less cheaper than a class method.  I don't think this is reaaally hard to do also... :S.  It's even simpler than the method pragmas, because we don't have to change the compiler :P.
>
> Cheers,
> Guille
>
> On Fri, Jul 9, 2010 at 9:25 PM, <[hidden email]> wrote:
> Stef,
>
>
> Just to have a better grasp of your reasoning: Are you suggesting we put annotations in a method and just have it/them lumped in an 'Annotations' protocol or are you suggesting a more radical change which will require the toolset to have changes in sync to them?
>
>
>
>
> Em 08/07/2010 11:48, Stéphane Ducasse < [hidden email] > escreveu:
> May be using a class method?
> But yes this would be important.
>
> Alex if we use comment we would have to parse them and this is not good.
>
> Stef
>
> On Jul 8, 2010, at 3:35 PM, Torsten Bergmann wrote:
>
> > Hi,
> >
> > while it is possible to annotate methods using Pragmas,
> > what about classes?
> >
> > Thx
> > T.
> > --
> > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [hidden email]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pragmas/Annotations for classes

Stéphane Ducasse
ok I see

I was thinking using methods (instance or class) with pragmas.

Stf


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
12