Skip to content

Instantly share code, notes, and snippets.

@takikawa
Created May 29, 2012 21:25
Show Gist options
  • Save takikawa/2830805 to your computer and use it in GitHub Desktop.
Save takikawa/2830805 to your computer and use it in GitHub Desktop.
Inits are weird #2
;; What should happen here?
(define c% (class object% (super-new) (init a)))
(define d% (class c% (super-new) (init #:a)))
(new d% #:a 5) ; which `a` does it instantiate?
(new d% #:a 5 #:a 6) ; presumably this is not allowed
; (if it is, then it's not like keywords)
; (if it's not, the above leaves an init un-initialized)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment