[Pharo-dev] Closure vs BlockClosure

Camille Teruel camille.teruel at gmail.com
Thu Apr 17 11:41:58 EDT 2014


On 17 avr. 2014, at 17:33, Camille Teruel <camille.teruel at gmail.com> 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 <alexandre.bergel at me.com> 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 <yuriy.tymchuk at me.com> 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 <alexandre.bergel at me.com> 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 <sebastian at flowingconcept.com> wrote:
>>>> 
>>>>> On Apr 17, 2014, at 10:08 AM, Yuriy Tymchuk <yuriy.tymchuk at me.com> 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'
>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 





More information about the Pharo-dev mailing list