[racket] Maybe a silly question: Why racket don't have a constructor?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Dec 19 22:19:11 EST 2012

(new (class object% (super-new) (displayln "hello world") (field ([x 10])) (displayln x))) 



On Dec 19, 2012, at 10:07 PM, Chen Xiao wrote:

> Why racket's class not like Java have a constructor method?
> 
> I want do something when "new class%".
> 
> Or I should not do anything when new class%?
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users



Posted on the users mailing list.