Le 04/09/2013 08:38, Marcus Denker a écrit :

On Sep 4, 2013, at 4:52 AM, "David T. Lewis" <[email protected]> wrote:

On Tue, Sep 03, 2013 at 01:48:46PM +0200, Goubier Thierry wrote:

Le 03/09/2013 13:36, David T. Lewis a ?crit :

Can you post the method here first? I'd like to check it on some Squeak
images
before it goes into the repository.

Here it is (at least an example):

in OSProcess class

isPharo3AndLater
        "Test if we are on Pharo 3.0"

        ^ (Smalltalk classNamed: 'SystemVersion')
                ifNil: [ false ]
                ifNotNil: [ :v | v current type = 'Pharo' and: [ v current
                major >= 3 ] ]

The idea is right, but the details can be a PITA ;-)

- In Squeak trunk, class SystemVersion exists. But it does not understand 
#type, so this fails at runtime.

- There are no implementors of #major in Squeak (but this can be rewritten 
using #perform:).

- In Squeak 3.8, #ifNil:ifNotNil: requires a block with no arguments.


Why do you need to support Squeak 3.8? This is how many years old?

I really do not understand this idea to be compatible to all old versions ever.

I respect whatever approach is used to make a usefull set of software portable across multiple versions / implementations / OS, as long as it works.

In the end it will just make sure that no progress is possible at all.

I'm less impressed by someone who says that 2.0 is the stable and won't be fixed, and that 3.0 isn't fixed as well.

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply via email to