December 10, 2012 Re: proposal for general dup function | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Monday, 10 December 2012 at 21:24:09 UTC, Andrei Alexandrescu wrote:
> On 12/10/12 4:20 PM, Jacob Carlborg wrote:
>> On 2012-12-10 21:10, Andrei Alexandrescu wrote:
>>
>>> You want to create a new window with the same parent. At the top level
>>> there's one desktop window, and probably having two would be odd.
>>
>> There are many applications that support several top level windows.
>> These are mostly document based.
>
> Are we really up for continuing to debate this?
>
> Andrei
I'm not up for this debate about Windows - just the original about gdup :-)
It is not an attempt to automatically determine reference or value semantics, even though your ideas on @owned and @foreign make sense and are a fine use of attributes. It is about a single phobos/library [g]dup function for structs that provides recursive deep copy without the need for struct designer to do anything extra. I think the benefits pointed out in the original make sense and are worth pursuing.
I have a feeling Walter would disagree - simply because apparently he is not a fan of postblits, which serve similar purpose. Further, from another thread he is not a fan of deep copy semantics in general, as he said there is almost never a need (which I would love to hear more commentary on). Yet TDPL shows the a prime example for the need in 7.1.3 (Widget). Plus we get questions all the time on how to cross from the const/immutable world to the mutable - which gdup provides.
Thanks
Dan
|
December 11, 2012 Re: proposal for general dup function | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 2012-12-10 22:24, Andrei Alexandrescu wrote: > Are we really up for continuing to debate this? No, not really. It's kind of a useless discussion. End. -- /Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation