[racket] parse-define-struct too liberal?

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Fri Sep 2 22:20:50 EDT 2011

parse-define-struct will parse an expression with anything in the
"define-struct" position; e.g.,

(let ([s #'(anything-goes m (a b))])
    (parse-define-struct s s))

succeeds.  However, it is strict about what goes in the field
positions, e.g., it cannot be used to parse

(let ([s #'(anything-goes m ([a : 2] [b : 3]))])
    (parse-define-struct s s))

Is the conservatism of the head position just an artifact of an _ in a
macro, or is it an actual feature that is used for some purpose?


Posted on the users mailing list.