[SciPy-user] Array Bounds

Robert Kern robert.kern@gmail....
Fri Mar 9 21:20:16 CST 2007

Jerry wrote:

> In my opinion, this is poor language design (along with Henry Ford- 
> style array indexing--any array you want as long as it starts with  
> zero) and an impediment to writing correct programs. Good design lets  
> the programmer abstract his program to resemble the real-world  
> problem that he is working on. Get used to it or move along--every  
> time I post about this, that's the advice I get. (1) Python arrays  
> will _never_ change; (2) it is blasphemous to even mention it; (3)  
> someone will ask, why in the world would anyone want an array that  
> doesn't start with zero; (4) someone will flame me.

(0) Someone will tell you that you can define whatever classes you like with
whatever index semantics that you like. It's all very well to *say* that things
would be better if one could change the lower index bound at will, but you have
the ability to *show* us, so why don't you? Try it out! Work out the inevitable
kinks with writing generic code that is agnostic to the heterogeneous index
semantics. Show us the code!

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list