[Style] same names for same data in ADT implementations
This commit is contained in:
parent
634644b11a
commit
b8cef59702
|
@ -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
|
||||
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
|
||||
ADT-argument first or last. Furthermore, if all of these functions accept
|
||||
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
|
||||
occurrences of @racket[latex-dest]---they all refer to the same kind of
|
||||
data.
|
||||
ADT-argument first or last.
|
||||
|
||||
Finally pick the same name for all function/method arguments in a module
|
||||
that refer to the same kind of data---regardless of whether the module
|
||||
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}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user