Re: From Lunacy++ to Euphoria (even without vaginas)

From: Ron Hardin (rhhardin_at_mindspring.com)
Date: 11/12/04


Date: Fri, 12 Nov 2004 13:36:15 GMT

Jugoslav Dujic wrote:
> | Anybody who starts subscripts at 1 and not zero has not learned
> | anything in life.
>
> Well, well, here we have Ron Hardin again presenting his own views
> as universal truths (just in a different area).
>
> I've been taught to count from 1 in my childhood -- don't know about
> you. About the only real-life exception are floors of a building, and
> even that convention is not the same accross both sides of Atlantic.
> Even the founders of Christian calendar did not find it appropriate
> to denote the first year as 0 AD (making us still quarell about the
> date when 2nd millenium starts, 2000 years later).
>
> | Not only do you have to code (i+1) everywhere, but the interpreter
> | then subtracts 1 from it each time.
>
> Where's that "everywhere" for Christ's sake? And why should user
> care about what interpreter does?

The manual begins to confront ugly consequences, but is upbeat about it

  Empty slices. Consider a slice s[i..j] where s is of length n. A slice from i to j,
  where j = i-1 and i >= 1 produces the empty sequence, even if i = n+1. Thus 1..0 and
  n+1..n and everything in between are legal (empty) slices. Empty
  slices are quite useful in many algorithms. A slice from i to j where j < i - 1 is
  illegal

``quite useful.'' I imagine so.

-- 
Ron Hardin
rhhardin@mindspring.com
On the internet, nobody knows you're a jerk.


Relevant Pages

  • Re: From Lunacy++ to Euphoria (even without vaginas)
    ... > | anything in life. ... > Well, well, here we have Ron Hardin again presenting his own views ... > as universal truths. ... About the only real-life exception are floors of a building, ...
    (sci.lang)
  • Re: Cart deleted
    ... Ron Hardin wrote: ... some reason when I sign in, Dell keeps taking me to the Small Business ... The SB cart is empty, ... You go to a gas station and find the cash register open and the toilets locked. ...
    (alt.sys.pc-clone.dell)
  • Re: ``Just Because ... doesnt mean ...
    ... ron hardin wrote: ... |>> Over at the NYT ... |>> Life in the Green Lane ...
    (sci.lang)