core.matrix icon indicating copy to clipboard operation
core.matrix copied to clipboard

Warnings of clashes with Clojure 1.11.0 abs.

Open wedesoft opened this issue 2 years ago • 6 comments

Clojure 1.11.0 and core.matrix both define abs leading to clashes. One gets a couple of warnings when requiring ~clojure.core.math~ clojure.core.matrix. Maybe abs should be renamed to mabs?

wedesoft avatar Mar 23 '22 10:03 wedesoft

I think best practice is for users to specify which symbols they import (with e.g. :refer) or even better use an alias? I think we are unlikely to rename core.matrix key functions at this point (there are plenty of other clashes with other library namespaces etc. this is unavoidable due to Clojure's design and the recommendation to use the best names in each namespace.

mikera avatar Mar 23 '22 11:03 mikera

Ok, I agree. But even when using :refer one gets warnings, because there are some clashes with abs inside clojure.core.matrix.

wedesoft avatar Mar 23 '22 13:03 wedesoft

Maybe unlike sin, cos, ... which are in clojure.core.math, abs is now in Clojure's main namespace I believe.

wedesoft avatar Mar 23 '22 13:03 wedesoft

I meant to say, one gets this warnings when requiring clojure.core.matrix even when using :refer.

wedesoft avatar Mar 23 '22 13:03 wedesoft

Thanks for developing core.matrix btw. Really useful software! :+1:

wedesoft avatar Mar 23 '22 20:03 wedesoft