[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is too an application



Incidentally, I was able to answer my own question:

(define t%
  (class object%
    (public t1 t2)
    (define t1
      (lambda x
        (printf "t1 called with args: ~a~n" x)))

    (define t2
      (lambda x
        (printf "t2 called with args: ~a~n" x)
        (send this t1 'foo . x)))
    (super-instantiate ())))

(define t (instantiate t% ()))
(send t t2 'a 'b 'c 'd)

Though, I would expect (send this t1 'foo . x) and (send this t1 . (cons
'foo x)) to be equivalent. I.e.
you should provide a list after the `.' and any list should work --- the
outermost parens to be stripped
off and the method applied with the list elements as its args.

As for Matthew's mention of a `send-apply' I think that would me more
Scheme-like than the current `.'
notation.