New std.range submodule
Rikki Cattermole via Digitalmars-d
digitalmars-d at puremagic.com
Thu Nov 13 22:10:36 PST 2014
On 14/11/2014 6:30 p.m., H. S. Teoh via Digitalmars-d wrote:
> Recently, some good progress has been made in cleaning up the messy web
> of imports between Phobos modules, so that importing one module for a
> single function won't also pull in half of Phobos. Part of this work has
> been to separate the range API constraints (isInputRange, hasLength,
> isForwardRange, etc.) from std.range into a new submodule currently
> named std.range.constraints.
>
> However, we are considering renaming it to a better name, because
> currently it also contains a bunch of stuff that are *not* "constraints"
> per se -- such as the range primitives for built-in arrays. They were
> put there because they are often used together with the range API
> constraints, and any code that uses them would also need to import the
> constraints anyway.
>
> Any ideas for a better name for this submodule? We'd like to get this
> decided before the next release, after which it will be more troublesome
> to rename it.
>
> Possible alternatives include:
>
> - std.range.core
> - std.range.api
> - etc.
>
> Any other suggestions?
>
>
> T
std.range.checks
I use this naming scheme for modules (with their purpose) for heavy ctfe
code.
Checks are:
1. Free functions
2. Expected to run at compile time only
3. Pure
4. Are templated
Helpers are:
1. Free functions
2. Expected to run at runtime
3. Not pure
4. May or may not be templated
More information about the Digitalmars-d
mailing list