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

monkyyy crazymonkyyy at gmail.com
Wed Jan 8 21:59:04 UTC 2025


hot take:

Getting opSlice to act correctly with a linked list a `[0..$-1]` 
call just requires 3 op overloads and in theory *every* 
bidirectional algorithm is optionally doubly linked list; its 
allot of complexity for what benefit?

I think this is my final range api:

```
core:
	front (techincally optional now)
	pop (popFront when phoboes compadiblity matters)
	empty

reference:
	data* (with opIndex(key))
	key
	keyback

length

bidirectional
	back
	popback
	keyback

"slicable":
	drop
	dropback
```


More information about the Digitalmars-d mailing list