Range Redesign: Empty Ranges
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Wed Mar 6 18:04:30 UTC 2024
On 07/03/2024 6:38 AM, Paul Backus wrote:
> The only tricky aspect is ranges that are references
> (classes/pointers). Neither of those to me should be supported IMO,
> you can always wrap such a thing in a range harness.
>
> The main thing you lose by dropping support for reference-type ranges is
> interfaces. In particular, the interface inheritance hierarchy in
> |std.range.interfaces|, where |ForwardRange| inherits from |InputRange|
> and so on, cannot really be replicated using |structs| (|alias this|
> only goes so far).
All of this would ideally be solved with the introduction of signatures.
But alas as we've covered in past conversations that is a big set of
features to introduce.
More information about the Digitalmars-d
mailing list