Tango vs Phobos

Sean Kelly sean at invisibleduck.org
Mon Aug 11 11:39:56 PDT 2008


Frank Benoit wrote:
> Jarrett Billingsley schrieb:
>> "Lars Ivar Igesund" <larsivar at igesund.net> wrote in message 
>> news:g7mboq$qcl$1 at digitalmars.com...
>>
>>> Also as long as closures are allocated on stack, that is likely to be 
>>> rather
>>> detrimental to the performance.
>>
>> Heap.
>>
>> That is another major blocker for me besides const.  Most of my code 
>> uses nested functions that are never supposed to be closures, and this 
>> "feature" would cause it all to unnecessarily allocate memory.
>>
> 
> i second that.
> It is an closure solution which was implemented too easy, imho.
> 
> 1.) it breaks the semantic of an existing syntax. So existing code can 
> be broken without any warning. (change in runtime behaviour)

Yup.  Much like the change in meaning of "const," which I've admittedly 
complained about perhaps overmuch.

> 2.) there is still no alternative syntax to get the old behaviour

I would prefer that the old behavior the the default and that "new &fn" 
or something similar would be used for full closures.

> 3.) the closures are not really closures. E.g. const variables can 
> change value. (Bug 2043)

This one, at least, is clearly a bug.


Sean



More information about the Digitalmars-d mailing list