On Thu, Jul 8, 2010 at 8:55 PM, Igor Stasenko <[email protected]> wrote:

> Guys, i really wonder, how it differs from using a usual smalltalk syntax
> for
> class declaration?
>
> pragmas: '<pragma1> <pragma2>'
>

> can be written as:
>
> pragmas: 'pragma1 pragma2'


> without any loss of extensibility/flexibility/whatever.
>

Agree, I just put it as an example.  Indeed I like more your simpler version
:).


>
> Of course, we can put any sequence of characters into the string
> literal and parse
> them in any way we want to, to extract some extra information. But is
> it worth it?
> But i wonder, why we should invent so over-complicated ways to do simple
> things?
>
> In any way, if we need that class should carry additional information,
> which needs to be formally represented in
> declaration, then i why not just keep using ordinary syntax, by adding
> either additional keywords, or even statements.
> Just look at ProtoObject declaration:
>
> ProtoObject subclass: #ProtoObject
>        instanceVariableNames: ''
>        classVariableNames: ''
>        poolDictionaries: ''
>        category: 'Kernel-Objects'.
> ProtoObject superclass: nil
>
> if we want to extend this, it is logically to follow the same pattern
> and add any other statements, like:
>
> MyClass foo: bar.
>

Do you mean something like...

ProtoObject subclass: #ProtoObject
       instanceVariableNames: ''
       classVariableNames: ''
       poolDictionaries: ''
       category: 'Kernel-Objects'.
ProtoObject superclass: nil
ProtoObject pragmas: 'pragma1 pragma2 pragma3'

?
That would be nice :D. We decouple the pragmas from the declaration and we
avoid making the combinatory :P.



>
> Just my 2c.
>
> 2010/7/9 Nicolas Cellier <[email protected]>:
> >
> >
> > 2010/7/8 Mariano Martinez Peck <[email protected]>
> >>
> >>
> >> 2010/7/8 Guillermo Polito <[email protected]>
> >>>
> >>> Why not add an extension to the #subclass: method family like
> >>>
> >>> Object subclass: #AppRegistry
> >>>     instanceVariableNames: ''
> >>>     classVariableNames: ''
> >>>     poolDictionaries: ''
> >>>     pragmas: '<pragma1> <pragma2>'
> >>>     category: 'System-Applications'
> >>>
> >>
> >> good idea. But then, you need to have a collection of Pragmas in
> Behavior,
> >> ClassDescription or similar.  Did I understand well?
> >>
> >
> > Would it be easily extensible ? I mean extending the class of another
> > package...
> >
> > Nicolas
> >
> >>
> >>
> >>
> >>>
> >>> ?
> >>>
> >>> On Thu, Jul 8, 2010 at 12:54 PM, Alexandre Bergel <[email protected]
> >
> >>> wrote:
> >>>>
> >>>> > May be using a class method?
> >>>> > But yes this would be important.
> >>>>
> >>>> The initialize method of the metaclass maybe.
> >>>>
> >>>> Alexandre
> >>>>
> >>>> >
> >>>> > 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
> >>>> >> [email protected]
> >>>> >>
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>> >
> >>>> >
> >>>> > _______________________________________________
> >>>> > Pharo-project mailing list
> >>>> > [email protected]
> >>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>>
> >>>> --
> >>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> >>>> Alexandre Bergel  http://www.bergel.eu
> >>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Pharo-project mailing list
> >>>> [email protected]
> >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>
> >>>
> >>> _______________________________________________
> >>> Pharo-project mailing list
> >>> [email protected]
> >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> [email protected]
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to