JuliaMath / IntelVectorMath.jl

Julia bindings for the Intel Vector Math Library
Other
73 stars 18 forks source link

some refactoring of the overload macro #38

Closed KristofferC closed 4 years ago

KristofferC commented 4 years ago
KristofferC commented 4 years ago

Just as a personal note, I am not sure this type of macro is a good idea. This is doing "type piracy" and if someone does this in a library it will add this behavior everywhere in the program. New users might get confused when cos(::Array) actually gives an answer when the documentation says it is not defined etc. It seems clearer to me to just write IntelVectorMath.cos.

Crown421 commented 4 years ago

Thank you very much, this PR together with adding in the artifact (which is absolutely wonderful) removes almost all external dependencies.

Regarding the macro: I personally use the exported alias (IVM) or a self defined one (for IVM.cos) and not the macro, but there seemed to be some demand for it. I remember some thread in the discourse that concluded with saying that imported function in a library/ package should be always qualified for clarity.

Crown421 commented 4 years ago

Closed in favour of #42