From: Ben Finney on
"D'Arcy J.M. Cain" <darcy(a)druid.net> writes:

> No. You are giving me math and logic but the subject was common
> sense.

Common sense is often unhelpful, and in such cases the best way to teach
something is to plainly contradict that common sense.

Common sense, for example, would have the Earth as a flat surface with
the Sun and Moon as roughly-identically-sized objects orbiting the
Earth. Is it better to pander to that common sense, or to vigorously
reject it in order to teach something more useful?

--
\ “Courage is not the absence of fear, but the decision that |
`\ something else is more important than fear.” —Ambrose Redmoon |
_o__) |
Ben Finney
From: CM on

> Apparently, the Japanese used to (before they started adopting western
> conventions). I.e. ages were given as "in his tenth year" (meaning nine
> years old).

Koreans still do this. The day a child is born it is "one". Even
odder to me, the next birthday is not on the next anniversary of the
birth, but on the following New Year's Day. So a kid who is born on
Dec 26th, will be "two" as of New Year's Day the week following his/
her birth. (They also are aware of the "western" version of their
ages if needed).
..




From: Ian Kelly on
On Sat, Aug 7, 2010 at 1:14 PM, John Nagle <nagle(a)animats.com> wrote:
>   FORTRAN, MATLAB, and Octave all use 1-based subscripts.
>
>   The languages which have real multidimensional arrays, rather
> than arrays of arrays, tend to use 1-based subscripts.  That
> reflects standard practice in mathematics.

I propose that this has less to do with the fact that those languages
have "real" multidimensional arrays, and more to do with the fact that
those languages are designed for doing mathematics. C, Oberon, and
others also have "real" multidimensional arrays, and use 0-based
subscripts. Standard practice in mathematics is not necessarily best
practice in programming.

Cheers,
Ian
From: Roy Smith on
In article
<7f3c505c-4002-427e-a969-6d735307e0f6(a)z10g2000yqb.googlegroups.com>,
CM <cmpython(a)gmail.com> wrote:

> > Apparently, the Japanese used to (before they started adopting western
> > conventions). I.e. ages were given as "in his tenth year" (meaning nine
> > years old).

With apologies to Paul Simon...

One man's ceil() is another man's floor()
From: Benjamin Kaplan on
On Sun, Aug 8, 2010 at 10:24 AM, Default User <hunguponcontent(a)gmail.com> wrote:
> Not to prolong a good "food fight", but IIRC, many years ago in QBasic,
> one could choose
>
> OPTION BASE 0
>
> or
>
> OPTION BASE 1
>
> to make arrays start with element [0] or element [1], respectively.  Could
> such a feature be added to Python without significantly bloating the
> interpreter?
>
> Then, if starting with [0] "works for you", nothing really changes.  And if
> starting with [1] "works for you", then you are not made to feel like a
> second-class citizen, and about as welcome as a dimwit at the Mensa
> meeting.
>
> Isn't Python supposed to be simple and accessible, and therefore fun?
>

Python is also about being readable and consistent. It's going to get
really confusing if half the files use 1-based lists and the other
half use 0-based. Is it really that hard to get used to indices
running from 0 to length-1? Also, good luck getting through life
without running into C, C++, C#, Visual Basic, F#, Java, Ruby, Perl,
Lisp, or OCaml code. Along with all the languages that use 0-based
arrays.