mikera / core.matrix

core.matrix : Multi-dimensional array programming API for Clojure
Other
700 stars 113 forks source link

Warnings of clashes with Clojure 1.11.0 abs. #357

Open wedesoft opened 2 years ago

wedesoft commented 2 years ago

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?

mikera commented 2 years ago

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.

wedesoft commented 2 years ago

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

wedesoft commented 2 years ago

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

wedesoft commented 2 years ago

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

wedesoft commented 2 years ago

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

jumarko commented 1 year ago

I second this - it would be great to get rid of those warnings. Several other libraries have fixed similar problems after clojure 1.11 was released, e.g. here https://github.com/MastodonC/kixi.stats/issues/41