Possibility of `local import` statements in future?

To update on what’s happening with the implementation, I made a comparison of load times using the original form of extending the Base functions and the new way of containing them locally. There is performance gain.

On the original master branch, the compile cache is 2.5 MiB and the load time is

julia> @time using Reduce
Reduce (Free PSL version, revision 4588), 28-Apr-2018 ...
 11.211845 seconds (7.25 M allocations: 402.106 MiB, 3.00% gc time)

While on the force-user brach, the compile cache is 1.7 MiB and the load time is

julia> @time using Reduce
Reduce (Free PSL version, revision 4588), 28-Apr-2018 ...
  6.455135 seconds (3.57 M allocations: 191.129 MiB, 4.70% gc time)

This difference can be attributable to the fact that the package contains definitions for over 50 conflicting methods from Base, such as arithmetic, matrix, trigonometric, and other elementary / special functions.

With the new definitions, the original dispatch from Base is essentially reduced down to a single one that encapsulate all of the Base methods, plus the additional new ones defined by the package.

Now, the multiple-dispatch is handled completely differently, which is why the tests are failing. The multiple-dispatch had to be very finely tuned to be in harmony with Base, and there were no issues or conflicts due to the precise fine tuning of the dispatch. However, since a simpler dispatch is now used using the

module Algebra
    export +
    +(r...) = Base.:+(r...)
end

using that form extension causes havoc on the multiple dispatch, since it was so finely tuned to work with the hundreds of existing methods from Base. This means that they fine tuning of dispatch has to be started over, since none of the dispatch structure from Base could be copied over to the new module.