The story of E, part 2 (fwd)

Ka-Ping Yee
Tue, 13 Oct 1998 10:36:16 -0700 (PDT)

On Tue, 13 Oct 1998, Dean Tribble wrote:
> > These are great!  I think ..! is a really cool syntactic innovation.
> It seems that closed-open should be the default.  (e.g "x..y!" could mean
> closed-closed).

I think this may be a little too surprising a behaviour for just
plain "..".  When i write 1, 2, 3, ..., 9 the typical interpretation
is that i started with 1 and finished with 9 and there are things
missing in the middle.  Likewise with "for x in (1..9)", for example.
A closed-open interval has a certain asymmetry to it that is well
expressed by the asymmetry of the operator "..!" (if a..b reads as
"from a until b" then a..!b naturally reads as "from a until -- but
not -- b").

I forget who else uses the ellipsis in this fashion other than Perl,
but i'm have the impression that some other languages do and i've
don't think i've ever seen closed-open as the default interpretation.

> > Hmm.  Regarding "len" vs. "length" vs. "size" ... can we just pick
> > one and go with it everywhere?  Less guessing is probably better.
> > I'm fine with any of them -- if you want to go with "length" to
> > appease Java folk, that's great.
> If you can stand some Java non-conformity, "count" has always seemed the best
> generic term.

Sure, anything -- Mark, just please bless *one*.