2010/7/9 Guillermo Polito <[email protected]>:
>
>
> 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.
>
yes.
But i don't understand why i would want to do this?
Let us put it straight and look into roots:
- you want to attach an arbitrary data to a class.
It could be used for anything, like comment, author, stamp, icon etc etc.
Adding just pragmas, for me, looks like too narrow and short-sighted
extension, which not really
helpful nor future-proof.
I'd rather look for something , which would allow me to attach any
meta-data to class,
and corresponding mechanisms to replicate it from/to source code or
binary format(s).
As well, as improve tools support for easy
navigating/inspecting/searching this data.

>
>>
>> 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
>



-- 
Best regards,
Igor Stasenko AKA sig.

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

Reply via email to