Hello,

I just figured that there is a thing in Racket coding style
that bothers me from time to time. That thing have never arised
in C-style languages.

Say I want to have a "vehicle" struct. Also, I would like to keep
its physical state in a separate structure. It seems natural
to call it "vehicle-state". Also it seems natural to have a
"state" member in the "vehicle" structure which refers to that
separate structure. Here we go:

(struct vehicle-state
  (position velocity))

(struct vehicle (state color model))

module: duplicate definition for identifier in: vehicle-state


The message is perfectly understandable. Yet the situation seems
common (at least for C++ programmers who switched to Racket),
and it would be good to know what are the common guidelines
to avoid it. Different capitalization in naming? Inheritance?

Best regards,

Dmitry
____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to