Re: From Lunacy++ to Euphoria (even without vaginas)
From: Ron Hardin (rhhardin_at_mindspring.com)
Date: 11/12/04
- Next message: Aidan Kehoe: "Re: Speaking without a foreign accent"
- Previous message: Peter T. Daniels: "Re: Seen at http://www.theage.com.au"
- In reply to: Jugoslav Dujic: "Re: From Lunacy++ to Euphoria (even without vaginas)"
- Next in thread: Jugoslav Dujic: "Re: From Lunacy++ to Euphoria (even without vaginas)"
- Reply: Jugoslav Dujic: "Re: From Lunacy++ to Euphoria (even without vaginas)"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Aidan Kehoe: "Re: Speaking without a foreign accent"
- Previous message: Peter T. Daniels: "Re: Seen at http://www.theage.com.au"
- In reply to: Jugoslav Dujic: "Re: From Lunacy++ to Euphoria (even without vaginas)"
- Next in thread: Jugoslav Dujic: "Re: From Lunacy++ to Euphoria (even without vaginas)"
- Reply: Jugoslav Dujic: "Re: From Lunacy++ to Euphoria (even without vaginas)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|