|
|
|
|
|
by Neku42
234 days ago
|
|
>Heavy reliance on the range interface, without automatic support for common range-like types like arrays, so calling code must be cluttered with wrappers. But D arrays/slices are already ranges. Is this referring to string autodecoding or something else completely?
I fail to recall any situations where builtin types required wrappers often. >Insistence on returning things exclusively as ranges, even when a single item is wanted, so calling code must be cluttered with dereferencing. (e.g. std.algorithm.searching.find) This is mirroring C++ iterator design and IMO the right move though I agree that specifically for ranges it is rather awkward to use in practice. What would you return instead? A pointer?
What if one wants to find the position of the element and do something after that with that position/subrange. |
|