× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Joep wrote:
Hm. I have always loathed zero-based indexes, because they force
humans to think the way computers work. White space as control
structures OTOH is exactly the other way round. Makes much more
sense to me.

Starting indexing at either 0 or 1 is to a great extent an issue of half a
dozen of one, six of the other. It's not just programming languages that
have the issue. Look at the way floors are numbered in buildings. In
Europe, for instance, the first floor above ground level is typically
numbered "1", not "2" as is the practice in North America.

But in programming, there are advantages to 0-based indexing, especially
if you're computing the index of an array element. Mistaking an index as
an offset is probably the biggest source of "off by one" errors.

Regarding white space in Python, it seems to be an issue only for people
who have never done any significant programming in Python. For those who
have, it very quickly becomes a non-issue since the vast majority of good
programmers already practice consistent indentation anyways.

Cheers! Hans



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.