On Mon, 16 Apr 2007 10:15:19 +0200, "Javier Bezos" <[EMAIL PROTECTED]> wrote:
>Paddy, > >>> Dijkstra's argument is obsolete, as it is based on >>> how array length was computed many years ago -- if >>> we have an array a = b..e, then the lenght of a >>> is e-b (half open range). Good at low level >>> programming. >>> >>> But a quarter of a century after we know concepts >>> are much better than low level programming and >>> explicit computations -- if we have an array >>> a = b..e, then the length of a should be a.length() >>> (or a.length(b,e)), and it is independent of > >> Hi Javier, >> You seem to have missed out array *indexing* >> in your argument, or is array indexing obsolete? > >Of course, it isn't, but it has evolved over the >past 25 years. When Djikstra wrote that, many >people (including me) was using a Spectrum--- >Now we have OO programming to deal with concepts >and a more generic programming. So, to me it's >clear his _argument_ is very outdated and cannot >be applied directly and withot reservations to >modern languages like Python. > One language created by and for mathematicians: Haskell. It uses zero based list indexing (the most similar to array indexing they have), so that list!!0 is the first element and list!!3 the fourth element. And they tend to reason in Dijkstra's style. They love natural numbers beginning with zer: zara -- http://mail.python.org/mailman/listinfo/python-list