attmpet to clarify define/contract's boundary a bit more
This commit is contained in:
parent
e78eb0563a
commit
34189b38f7
|
@ -119,11 +119,13 @@ Note that this has two potentially important impacts on the use of
|
|||
@racket[deposit]:
|
||||
|
||||
@itemlist[#:style 'ordered
|
||||
@item{Since the contract will always be checked on calls to @racket[deposit],
|
||||
even inside the module in which it is defined, this may increase
|
||||
the number of times the contract is checked. This could lead to
|
||||
@item{The contract will be checked on any call to @racket[deposit]
|
||||
that is outside of the definition of @racket[deposit] --
|
||||
even those inside the module in which it is defined. Because
|
||||
there may be many calls inside the module, this checking may cause
|
||||
the contract to be checked too often, which could lead to
|
||||
a performance degradation. This is especially true if the function
|
||||
is called repeatedly in loops or using recursion.}
|
||||
is called repeatedly from a loop.}
|
||||
@item{In some situations, a function may be written to accept a more
|
||||
lax set of inputs when called by other code in the same module.
|
||||
For such use cases, the contract boundary established by
|
||||
|
|
Loading…
Reference in New Issue
Block a user