uniqueness propagation
Steven Schveighoffer
schveiguy at yahoo.com
Fri Feb 25 19:35:39 PST 2011
On Fri, 25 Feb 2011 19:01:28 -0500, Tomek Sowiński <just at ask.me> wrote:
> Robert Jacques napisał:
>
>> On Fri, 25 Feb 2011 02:48:01 -0500, Kevin Bealer
>> <kevindangerbealer at removedanger.gmail.com> wrote:
>> > I think immutable could benefit from a Value Range Propagation-like
>> > uniqueness
>>
>> 'unique' has been proposed and heavily discussed before in the news
>> group.
>> There even is std.typecons.Unique. Unfortunately, Walter has stated that
>> there are issues/difficulties in adding 'unique' to the language.
>
> What were those difficulties?
>
YATC (yet another type constructor)
Plus, when this was the topic de jour, there were about 3 other type
constructors that were touted as "needed" in order to make unique work
(like "borrowed" and "lent"). Bartosz had a blog post about it. This
meant you had to accept 3 or 4 new type constructors to get unique.
I really like this idea as a way to have unique without the type
constructor: http://d.puremagic.com/issues/show_bug.cgi?id=5081
-Steve
More information about the Digitalmars-d
mailing list