> Unlike the bool version, if a library user were to accidentally flip the order of the arguments, the compiler would immediately complain:
error[E0423]: expected function, found macro `print`
--> use-types/src/main.rs:89:9
|
89 | print(Output::BlackAndWhite, Sides::Single);
| ^^^^^ not a function
|
help: use `!` to invoke the macro
|
89 | print!(Output::BlackAndWhite, Sides::Single);
| +
which is a compiler error for calling the wrong function, not swapping the arguments.Was this book not proof read at all? Is it AI generated? I'm not sure I can trust anything in it any more if something this basic was allowed through.