Nemocas / AbstractAlgebra.jl

Generic abstract algebra functionality in pure Julia (no C dependencies)
https://nemocas.github.io/AbstractAlgebra.jl/dev/index.html
Other
168 stars 63 forks source link

Make function arguments first in map_from_func, change_base_ring, etc. #421

Closed wbhart closed 5 years ago

wbhart commented 5 years ago

See edict 1 here:

https://docs.julialang.org/en/v1/manual/style-guide/index.html#Write-functions-with-argument-ordering-similar-to-Julia-Base-1

(assuming the documentation and convention doesn't change before you look at it).

rfourquet commented 5 years ago

It's a general principal that polynomials are not suitable for map

It seems the consensus is reached on this point. map_coeffs looks fine, it just feels that change_base_ring would be redundant with it. Aren't all rings supposed to be callable? Then all uses of map_coeffs look like they can be handled by map_coeffs (or whatever other map_* applicable for the specific object).

rfourquet commented 5 years ago

Is change_base_ring used by something for something else than matrices and polynomials? To continue with the point above, change_base_ring could be superseded by map_coeffs for polynomials, and by matrix(::Ring, ::MatrixElem) for matrices.

wbhart commented 5 years ago

Yes, ideals, modules, fractions and any number of other things. Anything that has a base ring.

It's fine as it is.

wbhart commented 5 years ago

Should this now be closed?