added promised note on no-contract' section

This commit is contained in:
Matthias Felleisen 2019-05-10 18:36:54 -04:00
parent 0dffc2fb29
commit 67ff3bc81c
2 changed files with 13 additions and 1 deletions

View File

@ -319,7 +319,7 @@ racket
efficiency; using @racket[in-list] to restrict the @tt{good} example to
the same range of data as the @tt{bad} one speeds up the former.
@bold{Note}: @racket[for] traversals of user-defined sequences tend to be
@bold{Note} @racket[for] traversals of user-defined sequences tend to be
slow. If performance matters in these cases, you may wish to fall back on
your own traversal functions.

View File

@ -545,6 +545,18 @@ in the outer module that re-exports the desired pieces of functionality.}
]
@margin-note*{We will soon supply a Racket documentation chapter that
explains the basics of our understanding of ``safety'' and link to it.}
@;
@bold{Note} Splitting contracted functionality into two modules in this way
render the code in the @tt{no-contract} @bold{unsafe}. The creator of the
original code might have assumed certain constraints on some function's
arguments, and the contracts checked these constraints. While the
documentation of the @tt{no-contract} submodule is likely to state these
constraints, it is left to the client to check them. If the client code
doesn't check the constraints and the arguments don't satisfy them, the
code in the @tt{no-contract} submodule may go wrong in various ways.
@compare[
@;%
@(begin