Revised RFC on range design for D2

Sergey Gromov snake.scaly at gmail.com
Sat Sep 13 03:17:20 PDT 2008


Sean Kelly <sean at invisibleduck.org> wrote:
> Bill Baxter wrote:
> > On Sat, Sep 13, 2008 at 1:03 AM, Pablo Ripolles <in-call at gmx.net> wrote:
> >>> Hmm.  One semantic issue I have is that the tip usually refers to the
> >>> infinitessimal point at the end.  Not a thing with substance.  I'm
> >>> having trouble feeling like I'm going to get an item back when I look
> >>> at "x.tip".  Head has huge history being used for the item at the
> >>> front of a list, so I think that's much less likely to cause anyone
> >>> looking at D code to scratch their heads.  It will be obvious what it
> >>> means even in relative isolation.  head/tip will often appear without
> >>> "toe" in forward range algos.  So you need to be able to easily
> >>> recognize what "tip" means without seeing that "toe" to give context.
> >>> Toe on the other hand will probably almost always appear with his
> >>> mate.
> >>>
> >>> Ooh, another scale thing, but a head is obviously a very different
> >>> scale than a toe.  A foot is closer to the same scale.  Maybe
> >>> head/foot is better than head/toe.  The connection between retreating
> >>> / feet is stronger that retreating / toes, too!
> >>>
> >>> --bb
> >> neither the tip of the tail, nor the tip of the wing, nor the tip of the flagellum are really infinitesimal...
> >>
> >> I'm not sure whether I understand your reasoning about the "tip" / "toe", I interpreted that "tip" could be a substitute of "toe"...
> > 
> > Nope.  I'm pretty sure that the discussion is about replacing "head"
> > with "tip".  There's an expression "from tip to toe".
> 
> There's also a song entitled "tiptoe through the tulips," which will 
> probably be stuck in my head for the rest of the day now.
> 
> > Well, there is only one tail... but it's what functional guys call
> > everything but the head, so Anrdrei wants to avoid it.
> 
> And what was wrong with first/last?

AFAIK, after Andrei switched to isEmpty/next/first for an Input range 
some algos started to look ugly to him.  I can't remember him mentioning 
which algorithms made him so upset that he reconsidered the name.  
Perhaps it was something about input stream where you called its next 
and then accessed its first...  Probably it looked a bit bad.

But if we ever get rid of first/head/tip/Obama in Input range then I 
cannot see a reason why ban first/last.  It's the most clean and 
abstract pair of all the body/airplane/politician parts being proposed.


More information about the Digitalmars-d-announce mailing list