Why is Exceptions c'tor this(immutable(char[]) instead of const(char[]) ?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Aug 26 14:27:31 PDT 2010


On 8/26/10 13:24 PDT, Mathias Laurenz Baumann wrote:
> Okay, sounds reasonable.
>
> What about many of the phobos functions, like for example from std.regex:
>
> int find(string s, RegExp pattern);
>
> I mean, that function won't store anything, right?

Good point. I think Regexp does actually store slices of its input 
string, but that artifact is not visible in the interface. I will look 
into it.

Andrei


More information about the Digitalmars-d mailing list