[Style] same names for same data in ADT implementations

This commit is contained in:
Matthias Felleisen 2012-06-18 08:58:13 -04:00 committed by Eli Barzilay
parent 634644b11a
commit b8cef59702

View File

@ -282,11 +282,13 @@ Pick a rule for consistently naming your functions, classes, and
Pick a rule for consistently naming and ordering the parameters of your Pick a rule for consistently naming and ordering the parameters of your
functions and methods. Stick to it. For example, if your module implements functions and methods. Stick to it. For example, if your module implements
an abstract data type (ADT), all functions on the ADT should consume the an abstract data type (ADT), all functions on the ADT should consume the
ADT-argument first or last. Furthermore, if all of these functions accept ADT-argument first or last.
the same kind of information they should do so in the same position and
with the same name. See @filepath{collects/setup/scribble} and search for Finally pick the same name for all function/method arguments in a module
occurrences of @racket[latex-dest]---they all refer to the same kind of that refer to the same kind of data---regardless of whether the module
data. implements a common data structure. For example, in
@filepath{collects/setup/scribble}, all functions use @racket[latex-dest]
to refer to the same kind of data, even those that are not exported.
@subsection{Sections and Sub-modules} @subsection{Sections and Sub-modules}