Smalltalk version

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

Smalltalk version

Roel Wuyts
Hello,

long time no see :-)  I'm doing things in Squeak again, so I'll try  
to follow the list once more...

One of the first things I want to mention is the demise of the method  
'version' on Smalltalk. It was actually decided at some point in time  
by Smalltalk environments to implement this method to return some  
description of the environment (the format of the version string was  
not standardized; go figure). This method exists in nearly all  
Smalltalk environments and makes it easy to write generic Smalltalk  
code with some environment-specific extensions for which one wants to  
check.

I use this, for example in RoelTyper, to check some Squeak or VW  
specific things. But now this method is deprecated, and instead of  
being able to do:
        Smalltalk version
I would now have to do:
        SystemVersion current version

The problem is that the first expressions works in nearly any  
Smalltalk environment, while the second one works only in Squeak,  
which defeats the whole purpose of this method! So I will have to  
write the following:

        ^(Smalltalk at: #SystemVersion ifAbsent: [^Smalltalk version])  
current version

My proposal: please do not deprecate the 'version' method on  
Smalltalk, but implement it as:

version

        SystemVersion current version


Any opinions ?

--
Roel

Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk version

stéphane ducasse-2
Hi Roel

On 6 avr. 06, at 15:07, Roel Wuyts wrote:

> Hello,
>
> long time no see :-)  I'm doing things in Squeak again, so I'll try  
> to follow the list once more...

Welcome back!

>
> One of the first things I want to mention is the demise of the  
> method 'version' on Smalltalk. It was actually decided at some  
> point in time by Smalltalk environments to implement this method to  
> return some description of the environment (the format of the  
> version string was not standardized; go figure). This method exists  
> in nearly all Smalltalk environments and makes it easy to write  
> generic Smalltalk code with some environment-specific extensions  
> for which one wants to check.
>
> I use this, for example in RoelTyper, to check some Squeak or VW  
> specific things. But now this method is deprecated, and instead of  
> being able to do:
> Smalltalk version
> I would now have to do:
> SystemVersion current version
>
> The problem is that the first expressions works in nearly any  
> Smalltalk environment, while the second one works only in Squeak,  
> which defeats the whole purpose of this method! So I will have to  
> write the following:
>
> ^(Smalltalk at: #SystemVersion ifAbsent: [^Smalltalk version])  
> current version
>
> My proposal: please do not deprecate the 'version' method on  
> Smalltalk, but implement it as:
>
> version
>
> SystemVersion current version
>
>
> Any opinions ?

Indeed for compatibility this can be cheap



Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk version

stéphane ducasse-2
In reply to this post by Roel Wuyts
Roel

I just checked and

version
        "Answer the version of this release."

        self backwardCompatibilityOnly: 'Use SystemVersion current version'.
        ^SystemVersion current version

Is there. So you can avoid the pop up by turning the preferences for  
not getting the warning.
We could remove the backwardCompatibility.
Stef

On 6 avr. 06, at 15:07, Roel Wuyts wrote:

> Hello,
>
> long time no see :-)  I'm doing things in Squeak again, so I'll try  
> to follow the list once more...
>
> One of the first things I want to mention is the demise of the  
> method 'version' on Smalltalk. It was actually decided at some  
> point in time by Smalltalk environments to implement this method to  
> return some description of the environment (the format of the  
> version string was not standardized; go figure). This method exists  
> in nearly all Smalltalk environments and makes it easy to write  
> generic Smalltalk code with some environment-specific extensions  
> for which one wants to check.
>
> I use this, for example in RoelTyper, to check some Squeak or VW  
> specific things. But now this method is deprecated, and instead of  
> being able to do:
> Smalltalk version
> I would now have to do:
> SystemVersion current version
>
> The problem is that the first expressions works in nearly any  
> Smalltalk environment, while the second one works only in Squeak,  
> which defeats the whole purpose of this method! So I will have to  
> write the following:
>
> ^(Smalltalk at: #SystemVersion ifAbsent: [^Smalltalk version])  
> current version
>
> My proposal: please do not deprecate the 'version' method on  
> Smalltalk, but implement it as:
>
> version
>
> SystemVersion current version
>
>
> Any opinions ?
>
> --
> Roel
>


Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk version

Roel Wuyts
I propose to remove the backwardCompatibility, since in this case it  
is one of the few methods that are actually the same across Smalltalk  
dialects by convention (and not by chance or evolution).


On 08 Apr 2006, at 21:44, stéphane ducasse wrote:

> Roel
>
> I just checked and
>
> version
> "Answer the version of this release."
>
> self backwardCompatibilityOnly: 'Use SystemVersion current version'.
> ^SystemVersion current version
>
> Is there. So you can avoid the pop up by turning the preferences  
> for not getting the warning.
> We could remove the backwardCompatibility.
> Stef
>
> On 6 avr. 06, at 15:07, Roel Wuyts wrote:
>
>> Hello,
>>
>> long time no see :-)  I'm doing things in Squeak again, so I'll  
>> try to follow the list once more...
>>
>> One of the first things I want to mention is the demise of the  
>> method 'version' on Smalltalk. It was actually decided at some  
>> point in time by Smalltalk environments to implement this method  
>> to return some description of the environment (the format of the  
>> version string was not standardized; go figure). This method  
>> exists in nearly all Smalltalk environments and makes it easy to  
>> write generic Smalltalk code with some environment-specific  
>> extensions for which one wants to check.
>>
>> I use this, for example in RoelTyper, to check some Squeak or VW  
>> specific things. But now this method is deprecated, and instead of  
>> being able to do:
>> Smalltalk version
>> I would now have to do:
>> SystemVersion current version
>>
>> The problem is that the first expressions works in nearly any  
>> Smalltalk environment, while the second one works only in Squeak,  
>> which defeats the whole purpose of this method! So I will have to  
>> write the following:
>>
>> ^(Smalltalk at: #SystemVersion ifAbsent: [^Smalltalk version])  
>> current version
>>
>> My proposal: please do not deprecate the 'version' method on  
>> Smalltalk, but implement it as:
>>
>> version
>>
>> SystemVersion current version
>>
>>
>> Any opinions ?
>>
>> --
>> Roel
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk version

stéphane ducasse-2
  it makes sense.


> I propose to remove the backwardCompatibility, since in this case  
> it is one of the few methods that are actually the same across  
> Smalltalk dialects by convention (and not by chance or evolution).