Re: [Newbies] Block and Closure

2009-04-10 Thread Bert Freudenberg
On 10.04.2009, at 05:48, Randal L. Schwartz wrote: K == K K Subramaniam subb...@gmail.com writes: K In Squeak, i in the block will refer to the i in the do: block and the last K statement will print 25 because i would be 5 when do: terminates. Not necessarily. I could see an

Re: [Newbies] Block and Closure

2009-04-10 Thread Ralph Johnson
In the original Smalltalk, blocks were almost but not quite closures. The ANSII standard says they are closures. As far as I know, all the Smalltalks except Squeak make blocks be closures. So, changing the way Squeak implements blocks will bring it into compliance with the standard and more like

Re: [Newbies] Block and Closure

2009-04-10 Thread Andrey Larionov
Thanks, all. Now I'm understood differences. On Fri, Apr 10, 2009 at 20:09, Ralph Johnson john...@cs.uiuc.edu wrote: In the original Smalltalk, blocks were almost but not quite closures. The ANSII standard says they are closures.  As far as I know, all the Smalltalks except Squeak make blocks

Re: [Newbies] Block and Closure

2009-04-10 Thread Lukas Renggli
In the original Smalltalk, blocks were almost but not quite closures. The ANSII standard says they are closures.  As far as I know, all the Smalltalks except Squeak make blocks be closures.  So, changing the I haven't yet met the Smalltalk implementation that has block closures without obvious

Re: [Newbies] Block and Closure

2009-04-10 Thread Marcin Tustin
Why is this particularly hard for smalltalk? Scheme implementations manage to do it. Is it simply that it's an afterthought, when it needs to be designed in from the ground up? On Fri, Apr 10, 2009 at 7:59 PM, Lukas Renggli reng...@gmail.com wrote: In the original Smalltalk, blocks were almost

Re: [Newbies] Block and Closure

2009-04-10 Thread Lukas Renggli
Why is this particularly hard for smalltalk? Scheme implementations manage to do it. Is it simply that it's an afterthought, when it needs to be designed in from the ground up? Two common problems I observed are related to: (1) Smalltalk inlines some blocks, such as the ones involved in

[Newbies] Block and Closure

2009-04-09 Thread Andrey Larionov
What difference between this things. I know about Eliots post describing closures in Squeak, but it's too massive and so special to understand. Thanks. -- Andrey Larionov ___ Beginners mailing list Beginners@lists.squeakfoundation.org

Re: [Newbies] Block and Closure

2009-04-09 Thread K. K. Subramaniam
On Friday 10 April 2009 3:24:42 am Andrey Larionov wrote: What difference between this things. I know about Eliots post describing closures in Squeak, but it's too massive and so special to understand Briefly, A closure tracks the full computational state of its block. A block is a executable

Re: [Newbies] Block and Closure

2009-04-09 Thread Randal L. Schwartz
K == K K Subramaniam subb...@gmail.com writes: K In Squeak, i in the block will refer to the i in the do: block and the last K statement will print 25 because i would be 5 when do: terminates. Not necessarily. I could see an implementation where i would be 4. -- Randal L. Schwartz -