January 2020
Intermediate to advanced
532 pages
13h 31m
English
Type I piracy refers to the situation where a programmer redefines a third-party function from their own module. Perhaps you did not like the original implementation in the third-party module and replaced the function with your own implementation.
The worst form of Type I piracy is when you replace the function without conforming to the original function's interface. Let's do an experiment and see what could happen. We will use the + function from Base as an example. As you know, when the + function is passed with two Int arguments, it should return an Int value as a result. What would happen if we replace the function so that it returns a string? Let's open up a REPL and give it a try:
Boom! The Julia REPL ...
Read now
Unlock full access