[racket] Redefining selectors - another newbie question

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Jul 1 16:14:24 EDT 2010

It's not about verbosity alone. 

(define-struct posn (x y z))

(define s (struct 1 2 3))

(posn-z s) performs two different tasks 
 -- checks that s is an instance of posn 
 -- then retrieves 3 from the structure 

s.z in C or C++ does only the second. 
s.z in Java is statically assigned a type. 


Posted on the users mailing list.