I'm not sure I'm thinking straight, but I wonder...
Can you put Slots inside an Association?

For example, could have two slots x and y,
and then be able to do the following...

    (x -> y) substitute: (1 -> 2).
    self assert: x equals: 1.
    self assert: y equals: 2.

So the association method #substitute:
assigns into the relevant variables.

And even better if you could do...
    (x -> y) := (1 -> 2).
and...
    { x. y ) := #(1 2).

For example, when you're hacking fast and want to return two values from a
method without mucking around with creating an object for this, it might
look like...
    myCalc
        ^#(1 2)

but instead of...
    result := inst myCalc.
    x := result at: 1.
    y := result at: 2.

you could do...
    { x . y } := inst myCalc.

cheers -ben

Reply via email to