Conversation
std/range/package.d
Outdated
| @property auto front() | ||
| { | ||
| assert(!empty, "Attempting to access front on an empty range"); | ||
| assert(!empty, "Attempting to access front on an empty slides"); |
There was a problem hiding this comment.
Plural noun used as singular?
There was a problem hiding this comment.
Yeah, it's awkward, but that is the name of the function that the user called and it follows the error message convention of the other structs in this package.
There was a problem hiding this comment.
That suggests "slider" may be a better name. Has "slides" been released yet?
There was a problem hiding this comment.
@andralex Typically range construction functions are verbs, e.g. map, filter, padLeft so maybe slide would be better?
|
@andralex Fixed |
std/range/package.d
Outdated
|
|
||
| Params: | ||
| f = If `Yes.slidesWithLessElements` slides with fewer | ||
| f = If `Yes.slideWithLessElements` slide with fewer |
There was a problem hiding this comment.
Looks like we also should do s/slideWithLessElements/slideWithFewerElements/g or better yet (because it's obvious from context) s/slideWithLessElements/withFewerElements/g
4182e6e to
a240041
Compare
|
@andralex Done. Also fixed two small grammar issues in the return statement. |
|
cc @wilzbach to keep him in the know |
|
|
||
| Params: | ||
| f = If `Yes.slidesWithLessElements` slides with fewer | ||
| f = If `Yes.withFewerElements` slide with fewer |
There was a problem hiding this comment.
Isn't this what the https://dlang.org/phobos/std_range.html#.StoppingPolicy is for?
slidestoslide