On 15 Mar 2014, at 8:05 , Friedrich Dominicus <[email protected]> 
wrote:

> That if you the developers of Phar change things many have to follow and
> it comes to things like this:
> "protocol: version dependent"
> platformName 
>       "After Squeak version 3.6, #platformName was moved to SmalltalkImage 
> Some
>       versions of Pharo move this to OSPlatform and issue deprecation warnings
>       about the other usages. The original idiom (Squeak 3.6 and earlier) is 
> the sensible
>       default, but here we attempt to support other implementations if the 
> sensible
>       default is not available."
> 
>       "OSProcess platformName"
> 
>       (Smalltalk respondsTo: #platformName)
>               ifTrue: [^ Smalltalk platformName].
>       self isPharo3AndLater
>               ifTrue: [ ^ (Smalltalk perform: #os) name ].
>       ^ (((Smalltalk hasClassNamed: #OSPlatform)
>                       and: [(Smalltalk at: #OSPlatform)
>                                       respondsTo: #platformName])
>               ifTrue: [Smalltalk at: #OSPlatform]
>               ifFalse: [((Smalltalk classNamed: 'SmalltalkImage')
>                               ifNil: [^ Smalltalk osVersion]) current]) 
> platformName
> 
> Now how many do have to follow through all this?
> 
> So well yes in the end it means not thinking about compatibility costs a
> lot thereafter....
> 

Smalltalk os platformName -> works in Pharo 1.3, 1.4, 2.0, 3.0, Squeak 4.1 (in 
other words, the first new code release after relicensing effort).

Smalltalk platformName -> works in all older version of Pharo/Squeak.

While there’s many places backwards compat could be better preserved, this is 
not one of them…

Cheers,
Henry

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to