dmd 1.057 and 2.041 release

Michal Minich michal.minich at gmail.com
Tue Mar 9 11:36:41 PST 2010


On Tue, 09 Mar 2010 14:07:10 -0500, Steven Schveighoffer wrote:

> On Tue, 09 Mar 2010 12:54:16 -0500, Lutger
> <lutger.blijdestijn at gmail.com> wrote:
> 
>> Michal Minich wrote:
>>
>>> On Tue, 09 Mar 2010 10:23:07 -0500, Steven Schveighoffer wrote:
>>>
>>>> I want to focus more on the fact that you are declaring the data
>>>> after the slice as being no longer used.
>>>
>>> kind of assumeUnique ...
>>>
>>> assumeNoArrayReference ?
>>
>> I like that. Or assumeNoMemoryAliasing. It should be clear that it is a
>> potentially very unsafe function.
> 
> I like this train of thought, assume is a good term for what you are
> doing, and it is consistent with assumeUnique.
> 
> The only thing I don't like about it is you aren't really assuming
> anything about the slice, you are assuming the data after the slice is
> no longer used.  It looks weird that you are assuming something about
> the slice.
> 
> assumeEndOfData ?
> assumeAllocation ?
> 
> I don't 100% like those either.
> 
> -Steve

assumeNoArrayReference does not express that there can be references to 
the original array before slice start. probably better expressing, if 
rather long name could be

assumeNoOriginArrayReferencesPastSliceEnd
assumeNoOriginArrayReferencesAfter

or probably somthing like this:
unsafeDeletePastSlice


More information about the Digitalmars-d-announce mailing list