[racket-dev] Instantiation syntax of `new`
On 2013-02-01 3:29 PM, Asumu Takikawa wrote:
> (new c% 1 2 3) => (instantiate c% (1 2 3))
> (new c% [x 1] [y 2]) => (instantiate c% [x 1] [y 2])
> (new c% [z 3] 1 2) => (instantiate c% (1 2) [z 3])
> (new c% 1 [z 3] 2) => (instantiate c% (1 2) [z 3])
How about
(inst c% 1 2 3)
(inst c% #:x 1 #:y 2)
(inst c% 1 2 #:z 3)
;; not sure what to do about the last one
?
I guess there's no exact analogy to keyword arguments because kw args
can't be positional in the current implementation.
Tony