×
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.