Smart slicing
bearophile
bearophileHUGS at lycos.com
Sun Mar 30 16:44:57 PDT 2008
Jesse Phillips:
> He is not referring to when it is the programmers intent to do it. It is
> the times when an index has gone out of bounds by accident.
> while(true) {
> writefln(str[i++]);
I was talking about _slicing_, not about array indexing (that is 1..5 instead of 5), so you are talking about something different. For a single index I agree that's an error (and that's a runtime error in Python too).
In the meantime nearly everyone has said this is a bad feature to add to D, so I have stopped advocating for it :-) There are quite more important things I like to think/talk about.
Bye,
bearophile
More information about the Digitalmars-d
mailing list