Another idiom I wish were gone from phobos/druntime

Tobias Pankrath via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 4 16:38:42 PST 2015


On Thursday, 5 February 2015 at 00:35:50 UTC, bearophile wrote:
> Andrei Alexandrescu:
>
>>            auto opSlice(size_t low, size_t high)
>>            in
>>            {
>>                assert(low <= high);
>>            }
>>            body
>>            {
>>                import std.range : take;
>>                return this[low .. $].take(high - low);
>>            }
>>
auto opSlice(size_t low, size_t high)
     in { assert(low <= high); }
body
{

}



More information about the Digitalmars-d mailing list