Let’s say you have a module in a package called
IO (obviously not preferable):
module IO custom_input_output_stuff = true end
The problem now is that the module
IO will clobber the Base
IO type in calls.
This leads to the following errors:
> foo(bar::IO) = "nope, chuck testa" ERROR: ArgumentError: invalid type for argument bar in method definition for foo at REPL:100: > struct Fizz ; buzz::IO ; end ERROR: TypeError: Fizz: in type definition, expected Type, got Module
How do you tell the package to use
Base's IO when a type is expected?
edit: tangentially related to Julia Reserved/Key Words