Is it worth having const/immutable functions on ranges? [was: Re: std.path review: second update]
Steven Schveighoffer
schveiguy at yahoo.com
Fri Jul 29 12:58:14 PDT 2011
On Fri, 29 Jul 2011 15:47:55 -0400, KennyTM~ <kennytm at gmail.com> wrote:
> Comments:
>
> - pathSplitter: empty, front, back could be const.
I know it seems like "if it could be const, we should mark it const", but
does it always make sense? I mean, consider this example. Should
front/back/empty be const? What are ever the chance that someone has a
const range? Consider that a const range is near useless (it can't do
it's primary function -- iterate).
Just wondering...
-Steve
More information about the Digitalmars-d
mailing list