1. Incidentally 1..10 is an inclusive list including the upper bound and 1...10 is exclusive (not including the 10) like Ruby.

      posted by James Strachan at 03:57:39 AM on January 17, 2004  
  2. Hmm, that doesn't seem to work for my version (1.0-beta-2):

    groovy< 1..10
    groovy<
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    groovy< 1...10
    groovy< [lots of errors]

    Maybe there's a newer version around that supports this, I don't know.

    Actually, I was hoping you wouldn't copy the .. vs ... thing from Ruby, since it's terribly non-intuitive. Oh well... :-)
      posted by Hans at 07:47:06 AM on January 17, 2004  
  3. (wrong HTML escape character, but you get the idea...)
      posted by Hans at 07:47:43 AM on January 17, 2004  
  4. This is a recent change in CVS. It'll make it into the beta-3 release later this week.

    FWIW at least supporting both inclusive & exclusive ranges avoids arguments over whether ranges should be inclusive or exclusive :)
      posted by James Strachan at 12:20:03 AM on January 20, 2004