Hi!
Just wondering, would it not make sense to rename BlockClosure into Closure? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
I would rather rename is to Block, as everyone is calling it a “block”.
Uko On 17 Apr 2014, at 16:01, Alexandre Bergel <[hidden email]> wrote: > Hi! > > Just wondering, would it not make sense to rename BlockClosure into Closure? > > Cheers, > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > |
On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: I would rather rename is to Block, as everyone is calling it a “block”. That might be actually a good idea PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' |
Well… the whole community of programming language call a closure a closure. Calling a block what is actually a closure may not be a well-marketed move in my opinion.
Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On Apr 17, 2014, at 10:29 AM, Sebastian Sastre <[hidden email]> wrote: > On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: > >> I would rather rename is to Block, as everyone is calling it a “block”. > > That might be actually a good idea > > sebastian > > o/ > > PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' > > |
I usually say “block” but I have nothing against a name change. I think “closure” would be an intention revealing name, I like it. And I’m willing to say “closure” from now on :)
On 17.04.2014, at 15:35, Alexandre Bergel <[hidden email]> wrote: > Well… the whole community of programming language call a closure a closure. Calling a block what is actually a closure may not be a well-marketed move in my opinion. > > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > On Apr 17, 2014, at 10:29 AM, Sebastian Sastre <[hidden email]> wrote: > >> On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: >> >>> I would rather rename is to Block, as everyone is calling it a “block”. >> >> That might be actually a good idea >> >> sebastian >> >> o/ >> >> PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' >> >> > > |
Administrator
|
In reply to this post by abergel
Given that Smalltalkers consider it a block and outsiders would understand the closure part, maybe it is well-named as it is, as it is an obvious link of these two terms.
Cheers,
Sean |
In reply to this post by abergel
On Apr 17, 2014, at 10:35 AM, Alexandre Bergel <[hidden email]> wrote:
javascript is teaching every day to thousands what a real Closure is every day, so yeah that would be probably better |
Am 17.04.2014 um 15:57 schrieb Sebastian Sastre <[hidden email]>: You mean the thing the is called Function? :) Norbert |
In reply to this post by Sean P. DeNigris
+1 for BlockClosure :-)
On 17 avr. 2014, at 15:44, Sean P. DeNigris wrote: > abergel wrote >> Well… the whole community of programming language call a closure a >> closure. Calling a block what is actually a closure may not be a >> well-marketed move in my opinion. > > Given that Smalltalkers consider it a block and outsiders would understand > the closure part, maybe it is well-named as it is, as it is an obvious link > of these two terms. > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/Closure-vs-BlockClosure-tp4755091p4755104.html > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. > Noury Bouraqadi Ecole des Mines de Douai http://car.mines-douai.fr/noury -- |
In reply to this post by abergel
It’s like saying that we have to run Pharo on JVM because everyone is doing that. In 80s block was invented. Why should we rename it because of some other languages?
Uko On 17 Apr 2014, at 16:35, Alexandre Bergel <[hidden email]> wrote: > Well… the whole community of programming language call a closure a closure. Calling a block what is actually a closure may not be a well-marketed move in my opinion. > > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > On Apr 17, 2014, at 10:29 AM, Sebastian Sastre <[hidden email]> wrote: > >> On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: >> >>> I would rather rename is to Block, as everyone is calling it a “block”. >> >> That might be actually a good idea >> >> sebastian >> >> o/ >> >> PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' >> >> > > |
Because what we call a block is actually a closure. Smalltalk-80 invented blocks, which were not closures at that time. Over the time we found out that Blocks are not really useful, but instead the humanity largely prefer closure.
But ok, this is not a pressing thing. Was just a tough. Just to hook up with another thread, it would be great if the VM would not emit (or at least optionally) keystroke event for actually what are mouse wheel events. Pharo is almost unusable if you have a touch mouse (e.g., mighty mouse). Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On Apr 17, 2014, at 11:45 AM, Yuriy Tymchuk <[hidden email]> wrote: > It’s like saying that we have to run Pharo on JVM because everyone is doing that. In 80s block was invented. Why should we rename it because of some other languages? > > Uko > > On 17 Apr 2014, at 16:35, Alexandre Bergel <[hidden email]> wrote: > >> Well… the whole community of programming language call a closure a closure. Calling a block what is actually a closure may not be a well-marketed move in my opinion. >> >> Alexandre >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> On Apr 17, 2014, at 10:29 AM, Sebastian Sastre <[hidden email]> wrote: >> >>> On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: >>> >>>> I would rather rename is to Block, as everyone is calling it a “block”. >>> >>> That might be actually a good idea >>> >>> sebastian >>> >>> o/ >>> >>> PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' >>> >>> >> >> > > |
In reply to this post by Uko2
Hi, I just wanted to mention that Apple also added 'Closures' as 'Blocks' to Objective-C (respectively C): Best, Manfred On Thu, Apr 17, 2014 at 4:45 PM, Yuriy Tymchuk <[hidden email]> wrote: It’s like saying that we have to run Pharo on JVM because everyone is doing that. In 80s block was invented. Why should we rename it because of some other languages? |
In reply to this post by sebastianconcept@gmail.co
2014-04-17 6:57 GMT-07:00 Sebastian Sastre <[hidden email]>:
Javascript closures are different from Smalltalk BlockClosure, they do not support non local return. This extra feature allows smalltalk Closures to be upgraded from just Closure to BlockClosure to avoid any confusion with javascript closures (or people would think they are the same).
|
In reply to this post by abergel
One thing that confuses me with these terminologies is that it's hard to know when someone speak about the syntactic construct (that you find in source code) or about the result of evaluating this construct (that close over an actual environment). What I mean is that a block can be evaluated several times, and each time it gives a new block closure. That's why I like the name BlockClosure: it make a difference between the block (that you find in source code) and the block closure (the object that represent the evaluation of a block). On 17 avr. 2014, at 17:21, Alexandre Bergel <[hidden email]> wrote: > Because what we call a block is actually a closure. Smalltalk-80 invented blocks, which were not closures at that time. Over the time we found out that Blocks are not really useful, but instead the humanity largely prefer closure. > > But ok, this is not a pressing thing. Was just a tough. > > Just to hook up with another thread, it would be great if the VM would not emit (or at least optionally) keystroke event for actually what are mouse wheel events. Pharo is almost unusable if you have a touch mouse (e.g., mighty mouse). > > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > On Apr 17, 2014, at 11:45 AM, Yuriy Tymchuk <[hidden email]> wrote: > >> It’s like saying that we have to run Pharo on JVM because everyone is doing that. In 80s block was invented. Why should we rename it because of some other languages? >> >> Uko >> >> On 17 Apr 2014, at 16:35, Alexandre Bergel <[hidden email]> wrote: >> >>> Well… the whole community of programming language call a closure a closure. Calling a block what is actually a closure may not be a well-marketed move in my opinion. >>> >>> Alexandre >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> On Apr 17, 2014, at 10:29 AM, Sebastian Sastre <[hidden email]> wrote: >>> >>>> On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: >>>> >>>>> I would rather rename is to Block, as everyone is calling it a “block”. >>>> >>>> That might be actually a good idea >>>> >>>> sebastian >>>> >>>> o/ >>>> >>>> PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' >>>> >>>> >>> >>> >> >> > > |
In reply to this post by abergel
+1
sebastian o/ > On 17/04/2014, at 12:21, Alexandre Bergel <[hidden email]> wrote: > > Because what we call a block is actually a closure. Smalltalk-80 invented blocks, which were not closures at that time. Over the time we found out that Blocks are not really useful, but instead the humanity largely prefer closure. > > But ok, this is not a pressing thing. Was just a tough. > > Just to hook up with another thread, it would be great if the VM would not emit (or at least optionally) keystroke event for actually what are mouse wheel events. Pharo is almost unusable if you have a touch mouse (e.g., mighty mouse). > > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > >> On Apr 17, 2014, at 11:45 AM, Yuriy Tymchuk <[hidden email]> wrote: >> >> It’s like saying that we have to run Pharo on JVM because everyone is doing that. In 80s block was invented. Why should we rename it because of some other languages? >> >> Uko >> >>> On 17 Apr 2014, at 16:35, Alexandre Bergel <[hidden email]> wrote: >>> >>> Well… the whole community of programming language call a closure a closure. Calling a block what is actually a closure may not be a well-marketed move in my opinion. >>> >>> Alexandre >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>>> On Apr 17, 2014, at 10:29 AM, Sebastian Sastre <[hidden email]> wrote: >>>> >>>>> On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: >>>>> >>>>> I would rather rename is to Block, as everyone is calling it a “block”. >>>> >>>> That might be actually a good idea >>>> >>>> sebastian >>>> >>>> o/ >>>> >>>> PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' > > |
In reply to this post by camille teruel
On 17 avr. 2014, at 17:33, Camille Teruel <[hidden email]> wrote: > > One thing that confuses me with these terminologies is that it's hard to know when someone speak about the syntactic construct (that you find in source code) or about the result of evaluating this construct (that close over an actual environment). > What I mean is that a block can be evaluated several times, and each time it gives a new block closure. > That's why I like the name BlockClosure: it make a difference between the block (that you find in source code) and the block closure (the object that represent the evaluation of a block). And I think that some languages make this distinction: they say lambda expression for the former and closure for the later > > > On 17 avr. 2014, at 17:21, Alexandre Bergel <[hidden email]> wrote: > >> Because what we call a block is actually a closure. Smalltalk-80 invented blocks, which were not closures at that time. Over the time we found out that Blocks are not really useful, but instead the humanity largely prefer closure. >> >> But ok, this is not a pressing thing. Was just a tough. >> >> Just to hook up with another thread, it would be great if the VM would not emit (or at least optionally) keystroke event for actually what are mouse wheel events. Pharo is almost unusable if you have a touch mouse (e.g., mighty mouse). >> >> Alexandre >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> On Apr 17, 2014, at 11:45 AM, Yuriy Tymchuk <[hidden email]> wrote: >> >>> It’s like saying that we have to run Pharo on JVM because everyone is doing that. In 80s block was invented. Why should we rename it because of some other languages? >>> >>> Uko >>> >>> On 17 Apr 2014, at 16:35, Alexandre Bergel <[hidden email]> wrote: >>> >>>> Well… the whole community of programming language call a closure a closure. Calling a block what is actually a closure may not be a well-marketed move in my opinion. >>>> >>>> Alexandre >>>> -- >>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>>> Alexandre Bergel http://www.bergel.eu >>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>>> >>>> >>>> >>>> On Apr 17, 2014, at 10:29 AM, Sebastian Sastre <[hidden email]> wrote: >>>> >>>>> On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <[hidden email]> wrote: >>>>> >>>>>> I would rather rename is to Block, as everyone is calling it a “block”. >>>>> >>>>> That might be actually a good idea >>>>> >>>>> sebastian >>>>> >>>>> o/ >>>>> >>>>> PS: thinking in that line there is also ‘Context’ as, conceptually, what these blocks of code want to do is to keep the evaluation in a specific context. But to ease know-how transference and type less I’d rather go with the most popular name, as you suggested: ‘Block' >>>>> >>>>> >>>> >>>> >>> >>> >> >> > |
In reply to this post by abergel
Hi Alexandre,
On Thu, Apr 17, 2014 at 8:21 AM, Alexandre Bergel <[hidden email]> wrote: Because what we call a block is actually a closure. Smalltalk-80 invented blocks, which were not closures at that time. Over the time we found out that Blocks are not really useful, but instead the humanity largely prefer closure. I don't think this is right. Yesterday Clément and I had lunch with Dan Ingalls and we talked about the origin of blocks. At first blocks were not even real objects; instead they were just a syntactic construct for delayed evaluation. Over time the original Smalltalk team found they needed more and more useful features, and they wanted everything to be objects so they introduced both the syntax for blocks and the class BlockContext, but they didn't look at other languages and so they didn't implement blocks as closures.
So I think its more accurate to say Over time Smalltalkers found blocks were /really/ useful. Later on they found out that they could implement blocks as closures, with the result that they were even more useful and much cleaner, leading to a more efficient virtual machine.
But ok, this is not a pressing thing. Was just a tough. If it ain't broke don't fix it. The name BlockClosure isn't incorrect. These are blocks implemented as closures. The name MethodContext /is/ broken. These /aren't/ just MethodContexts any more, they are both BlockContexts and MethodContexts, so collapsing ContextPart and MethodContext together into just Context, and deleting the now unused BlockContext does make sense.
[snip]
best, Eliot
|
On Apr 17, 2014, at 1:54 PM, Eliot Miranda <[hidden email]> wrote:
That historic connection is really important. I love to hear grey haired people’s advice :) Thanks a lot for sharing it here Eliot. If it ain't broke don't fix it. +1 |
In reply to this post by Sean P. DeNigris
> abergel wrote >> Well… the whole community of programming language call a closure a >> closure. Calling a block what is actually a closure may not be a >> well-marketed move in my opinion. > Given that Smalltalkers consider it a block and outsiders would understand > the closure part, maybe it is well-named as it is, as it is an obvious link > of these two terms. :) and do not expect us to change the name. We have a lot of other important things to do than to break for the sake of breaking the system. Stef > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/Closure-vs-BlockClosure-tp4755091p4755104.html > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. > > |
In reply to this post by Eliot Miranda-2
On 17/4/14 18:54, Eliot Miranda wrote: > If it ain't broke don't fix it. The name BlockClosure isn't > incorrect. These are blocks implemented as closures. The name > MethodContext /is/ broken. These /aren't/ just MethodContexts any > more, they are both BlockContexts and MethodContexts, so collapsing > ContextPart and MethodContext together into just Context, and deleting > the now unused BlockContext does make sense. This is planned :) I now that clement started to look at them with a strange look :) Stef |
Free forum by Nabble | Edit this page |