Tricky semantics of ranges & potentially numerous Phobos bugs

monarch_dodra monarchdodra at gmail.com
Wed Oct 17 11:21:34 PDT 2012


On Wednesday, 17 October 2012 at 18:13:42 UTC, Andrei 
Alexandrescu wrote:
> On 10/17/12 1:29 PM, monarch_dodra wrote:
>> On Wednesday, 17 October 2012 at 17:15:14 UTC, Andrei
>> Alexandrescu wrote:
>>> On 10/16/12 3:07 PM, H. S. Teoh wrote:
>>>> Perhaps mark ranges with an .isTransient property
>>>
>>> isTransient!R is exactly the same thing as isInputRange!R &&
>>> !isForwardRange!R.
>>>
>>> Andrei
>>
>> Technically, (isTransient!R) is just a subset of 
>> (isInputRange!R
>> && !isForwardRange!R)
>>
>> "byDChar" (if it existed), would be a perfectly valid
>> non-transient input only range.
>
> Depends on implementation - popFront may actually wipe the 
> character.
>
> Andrei

"byDChar" (if it existed), *could* be a perfectly valid 
non-transient input only range, if the implementation returns the 
character by value. :)


More information about the Digitalmars-d mailing list