Smart slicing
bearophile
bearophileHUGS at lycos.com
Thu Mar 20 17:48:34 PDT 2008
Trevor Parscal Wrote:
> Allowing out-of-bounds indexes hides bugs. An out of bounds index should always be an error which is considered exceptional.
I (like all all Ruby and Python programmers) use such things all the time, and only once in a while it actually produces a bug in my programs, so I presume you are wrong.
> If you handle the index wrapping yourself, it's obvious to everyone that in that particular case that would be an OK thing to do - in all other cases, it could potentially be an error..
In my post I am talking about using an alternative (standard) syntax fur such usages (to keep speed up, not to remove bugs).
Bye,
bearophile
More information about the Digitalmars-d
mailing list