ClassDescription>>classVersion

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

ClassDescription>>classVersion

Alexandre Bergel
Hola!

This method looks really suspicious to me. 6 classes implements  
#classVersion. Either #classVersion returns 0 or 1.
Having the knowledge about a class version is definitely important.  
But I have the strong feeling this should be implemented that way. The  
packaging system should provide the information.
Any opinion?

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
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: ClassDescription>>classVersion

Lukas Renggli
> This method looks really suspicious to me. 6 classes implements
> #classVersion. Either #classVersion returns 0 or 1.

This is used by ReferenceStream (and thus ImageSegment) to distinguish
between class versions, see the comment in ClassDescription. The
number is used to be able to distinguish different class versions and
fix them if necessary when loading.

> But I have the strong feeling this should be implemented that way. The
> packaging system should provide the information.

This version number has definitely nothing to do with packaging or
with information a packaging system could provide.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
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: ClassDescription>>classVersion

Alexandre Bergel
>> This method looks really suspicious to me. 6 classes implements
>> #classVersion. Either #classVersion returns 0 or 1.
>
> This is used by ReferenceStream (and thus ImageSegment) to distinguish
> between class versions, see the comment in ClassDescription. The
> number is used to be able to distinguish different class versions and
> fix them if necessary when loading.

Yes, this is what the code clearly says. But do you think this method  
contributes to the beauty Pharo is striving for?

>> But I have the strong feeling this should be implemented that way.  
>> The
>> packaging system should provide the information.
>
> This version number has definitely nothing to do with packaging or
> with information a packaging system could provide.

Indeed.

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
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: ClassDescription>>classVersion

Lukas Renggli
>> This is used by ReferenceStream (and thus ImageSegment) to distinguish
>> between class versions, see the comment in ClassDescription. The
>> number is used to be able to distinguish different class versions and
>> fix them if necessary when loading.
>
> Yes, this is what the code clearly says. But do you think this method
> contributes to the beauty Pharo is striving for?

Not really, but if you remove it ImageSegments and ReferenceStreams
break. I guess Pier users and various companies won't be happy with
that ;-)

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

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