`drop` not `opSlice` should be in the range api

monkyyy crazymonkyyy at gmail.com
Fri Jan 10 18:46:33 UTC 2025


On Friday, 10 January 2025 at 16:06:18 UTC, Dukc wrote:
> 
> With a linked list, the execution time increases linearly with 
> the amount of elements to be dropped, meaning it shouldn't have 
> a slice operation as per convention. Unless I'm mistaken, this 
> particular convention is inherited from C++ Standard Template 
> Library.

That maybe the theory in practice Im pretty sure Phobos has this 
very high standard for a "random access range" and all slicing is 
behind it, while most algorithms instantly discard one of the 
requirements so nothing maintains it

Theres a reason allot of code uses .array as glue


More information about the Digitalmars-d mailing list