Generic const - a non-functional view

Me Here p9e883002 at sneakemail.com
Wed Jun 25 21:54:21 PDT 2008


Walter Bright wrote:

Perl has invariant strings, but they are implicitly invariant
> and so nobody notices it, they just work.
> 
Sorry Walter, but thta is simply not the case: Vis:

[0] Perl> $x = 'x' x 500e6;
[0] Perl> print length $x;;
500000000
[0] Perl> substr $x, 250e6, 1, 'y';;
[0] Perl> print length $x;;
500000000
[0] Perl> print substr $x, 250e6-5, 10;;
xxxxxyxxxx

b.
-- 




More information about the Digitalmars-d mailing list