Predicates for dialects

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

Predicates for dialects

Casey Ransberger-2
Here's some predicates from Squeak. I should get #isCuis into Squeak soon if it isn't there in the trunk (I've been using the stable version lately.)

Example:

SystemVersion current isPharo        --> false

This way we might be able to push some of the changes we need in external packages upstream. I like the convention. 

--
Casey Ransberger

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

1579-CuisCore-CaseyRansberger-2013Jan27-08h08m-cbr.1.cs.st (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Predicates for dialects

Hannes Hirzel
Hello Casey

I do not think that these predicates are useful.

They are the equivalent of

#isInternetExplorer, #isMozilla or #isChrome

in web programming. And there the common wisdom is not to test for
browsers as such but for the presence of features.

So for the hierarchical list morph you can easily check in the system
dictionary what is there and then adapt your code accordingly.

--Hannes

On 1/27/13, Casey Ransberger <[hidden email]> wrote:

> Here's some predicates from Squeak. I should get #isCuis into Squeak soon
> if it isn't there in the trunk (I've been using the stable version lately.)
>
> Example:
>
> SystemVersion current isPharo        --> false
>
> This way we might be able to push some of the changes we need in external
> packages upstream. I like the convention.
>
> --
> Casey Ransberger
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Predicates for dialects

Juan Vuletich-4
In reply to this post by Casey Ransberger-2
Hi Casey,

I added your 3 selectors to the update stream, but modified the code to
simply answer true or false as appropriate. I mean, in Cuis, we do know
this is Cuis and not Squeak or Pharo!

Cheers,
Juan Vuletich

Casey Ransberger wrote:

> Here's some predicates from Squeak. I should get #isCuis into Squeak
> soon if it isn't there in the trunk (I've been using the stable
> version lately.)
>
> Example:
>
> SystemVersion current isPharo        --> false
>
> This way we might be able to push some of the changes we need in
> external packages upstream. I like the convention.
>
> --
> Casey Ransberger
> ------------------------------------------------------------------------
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>  


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org