[Glass] GemStone's #on:do: could be cull: instead of value: ?

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

[Glass] GemStone's #on:do: could be cull: instead of value: ?

Mariano Martinez Peck
Hi guys, 

Some weeks ago I noticed #on:do: behaved different than Pharo. Basically, in Pharo, the argument of the do: is not mandatory while in GemStone it is. So Pharo has a kind of #value: behavior while GemStone has #cull:. 

Does ANSI Smalltalk say something about it? Do you have plans of making it like Pharo behavior? 
Maybe there are strong reason for let it as is?

Cheers,


--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] GemStone's #on:do: could be cull: instead of value: ?

Dale Henrichs-3
Mariano,

I am not an ANSI geek, so I can't comment on that aspect ... 

It is a little unrealistic to expect GemStone to change as fast as Pharo:) I have tried to keep pace with the compatibility layer (i.e., #cull:... was added in the compatibility layer), but for the blocks that are created in the exception handling layer it isn't that easy to add change for compatibility since much of the exception handling logic is done in C code and not Smalltalk ...

With that said, I will check into the feasibility of using #cull: for the exception handling blocks...

Dale


On Mon, Jan 20, 2014 at 4:58 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys, 

Some weeks ago I noticed #on:do: behaved different than Pharo. Basically, in Pharo, the argument of the do: is not mandatory while in GemStone it is. So Pharo has a kind of #value: behavior while GemStone has #cull:. 

Does ANSI Smalltalk say something about it? Do you have plans of making it like Pharo behavior? 
Maybe there are strong reason for let it as is?

Cheers,


--
Mariano
http://marianopeck.wordpress.com

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] GemStone's #on:do: could be cull: instead of value: ?

Martin McClure-5
In reply to this post by Mariano Martinez Peck
On 01/20/2014 04:58 AM, Mariano Martinez Peck wrote:

> Hi guys,
>
> Some weeks ago I noticed #on:do: behaved different than Pharo.
> Basically, in Pharo, the argument of the do: is not mandatory while in
> GemStone it is. So Pharo has a kind of #value: behavior while GemStone
> has #cull:.
>
> Does ANSI Smalltalk say something about it? Do you have plans of making
> it like Pharo behavior?
> Maybe there are strong reason for let it as is?

Hi Mariano,

ANSI does say that the argument to the do: is a monadic block. I don't
think it would actually violate ANSI, though, for a Smalltalk
implementation to also allow a niladic block there.

Regards,

-Martin
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: [Glass] GemStone's #on:do: could be cull: instead of value: ?

Richard Sargent
Administrator
On Tue, Jan 21, 2014 at 1:36 PM, Martin McClure <[hidden email]> wrote:
ANSI does say that the argument to the do: is a monadic block. I don't
think it would actually violate ANSI, though, for a Smalltalk
implementation to also allow a niladic block there.

It is true that a conforming implementation is free to do more than what ANSI mandates, so making the argument optional should be acceptable.

However, it does mean your code that uses a niladic Block will NOT be ANSI compliant, reducing its portability. (And that is exactly what you found with the Pharo code.)
 

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass