Proposed Changes to the Range API for Phobos v3
Quirin Schroll
qs.il.paperinik at gmail.com
Tue Jun 4 15:47:50 UTC 2024
On Saturday, 18 May 2024 at 20:48:51 UTC, Dukc wrote:
> Jonathan M Davis kirjoitti 16.5.2024 klo 17.56:> This is a
>> 10. While it's not exactly a problem with the range API, it
>> would be nice if
>> we didn't have to import std.range / std.range.primitives (or
>> the Phobos v3
>> equivalent) to use arrays as ranges.
>
> Respectful disagree on this one. Ranges are (bar for the
> foreach range API) a Phobos concept, not a language concept.
> It's good to be able to pick whether functions in your module
> will digest ranges, and if, whether it's V2, V3 or some other
> API. I wish for no changes here.
The range API is baked into the language through `foreach`
semantics. It’s not a Phobos feature, it’s a core language
feature.
More information about the Digitalmars-d
mailing list