Syntax: object (supers ...) field-or-method-decl ...
Returns a new instance of an anonymous (inner) class. The syntax is similar to
define-class.
field-or-method::=field-decl|method-decl
field-decl::= (fname[[[::]ftype]finit])
| (fname[::ftype] [option-keywordoption-value]*)
method-decl::= ((method-nameformal-arguments) [[::]rtype]body)
Returns a new instance of a unique (anonymous) class. The class inherits from the list of
supers, where at most one of the elements should be the base class being extended from, and the rest are interfaces.This is roughly equivalent to:
(begin (define-simple-classhname(supers...)field-or-method-decl...) (makehname))A
field-declis as fordefine-class, except that we also allow an abbreviated syntax. Eachfield-decldeclares a public instance field. Ifftypeis given, it specifies the type of the field. Iffinitis given, it is an expression whose value becomes the initial value of the field. Thefinitis evaluated at the same time as theobjectexpression is evaluated, in a scope where all thefnames are visible.A
method-declis as fordefine-class.