On Tuesday, April 8, 2014 2:18:18 PM UTC-7, Stefan Karpinski wrote: > > It may not address the cross-module aspect well. We didn't have modules > when I write it originally, so any documentation of that interaction would > necessarily be tacked on. > > "Modules" comes after "Methods", so "Modules" could be added to, for the sake of sequential readers. The first relevant except from "Modules" is:
Method definitions are a bit special: they do not search modules named in using statements. The definitionfunction foo() creates a new foo in the current module, unless foo has already been imported from elsewhere. For example, in MyModule above we wanted to add a method to the standard show function, so we had to write import Base.show. Explaining the difference between redefining and extending a function might be beneficial: e.g. saying that someone might want to extend Base.getindexso standard library functions can index into instances of their types. The other relevant excerpt is one typically wants to extend operators rather than creating entirely new definitions of them That line seems to assume the reader understands the difference between extending and redefining functions, so explaining it above would help the reader understand this section as well.
