Dan Sugalski <[EMAIL PROTECTED]> wrote:
> *) We consider ways to make slices. I can see ops, or I can see basic
> functions. Either is fine, depends on how often the things are used.

I'll start from the end of the proposal. What about just extending the
keyed syntax:

    Px = Py[0]           # key
    Px = Py["a"; 1]      # multi key
    Px = Py[0..2, 4]     # slice
    Px = Py["a", "b"]    # slice
    Px = Py[I0, I1..]    # slice

So a slice PMC is basically a Key PMC with two additional flags per key
component: start_range .. end_range. The comma starts a new key
component. Key components are typed and constructed at compile time, so
we would have already what we need with low overhead.

BTW: is there something like:

   Px = Py["a".."x"]

or even

   Px = Py["aaa".."xxx"]

leo

Reply via email to