On Fri, May 20, 2005 at 05:15:24PM -0400, C. Scott Ananian wrote: > On Fri, 20 May 2005, Yuval Kogman wrote: > > >then it is not finalized into a real value. Here's how the range > >operator would be implemented: > > > > sub &infix:<..> ($from, $to where { $to < $from }){ reverse $to .. > > $from } > > sub &infix:<..> ($from, $to) { lazy gather { > > while ($from <= $to) { > > take($from++); > > } > > }} > > This is very elegant. It might be worthwhile for someone to attempt to > define a 'core perl' set of operators, etc, so that the 'rest of perl' can > be defined in perl proper...
It may be fairly tough to identify what's "core" and what isn't. But in general I'd propose that if something can be easily and efficiently defined as a perl 6 sub or method, then let's at least document it that way (if not actually implement it that way) and later we'll optimize the things that need optimizing. Pm