Closed holtzermann17 closed 4 years ago
I have thought about it a bit, but I think trying to explain this will only make the text more confusing. The text explains that these are the definitions in the library, and the examples work as they stand. Elsewhere the text explains the use of hidden
to avoid clashes and ambiguities. Users who cut and paste to experiment with the examples will have to figure out from the error messages that the duplicate definitions are causing problems.
I ran into trouble in similar ways in #76 and #77 with two bits of sample code that redefine standard library components. Is there a way to adjust the way these examples are treated, to help the reader avoid ambiguity? E.g., in #77, if the duplicate
add
is defined in thehidden
namespace,#check hidden.add 2 2
is not ambiguous. One possibility would be to incorporate the error into the sample code with a comment.