On Thursday, October 28, 2010 06:16:46 David Simcha wrote:
> On 10/28/2010 1:24 AM, Jonathan M Davis wrote:
> > The problem is string literals. Aren't string literals immutable(char[])?
> > It seems incredibly stupid to have to write
>
> No, string literals are immutable(char)[]. The following code compiles
> w/ the latest beta:
>
> import std.string;
>
> void main() {
> bool result = startsWith("Foo", "Fo");
> }
I understood that the complaint was that using literals with startsWith()
didn't
work. It was also my understanding that string literals were immutable(char
[]).
I guess that I misunderstood. Well, then that's fine. Having a range variable
that you explicitly made immutable not work with algorithms makes sense. It's
just that having string literals fall in that camp would be a big problem and
that was my concern.
- Jonathan M Davis
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta