nucypher / DarkIntegers.jl

A modulo arithmetic toolbox for integers and polynomials
https://nucypher.github.io/DarkIntegers.jl
GNU General Public License v3.0
7 stars 2 forks source link

Switch the order of types in `MLUInt`/`MLInt`? #3

Open fjarri opened 4 years ago

fjarri commented 4 years ago

In Julia, MyType{T, V} <: MyType{T}, so in some sense the first type argument is more "basic" than the second one. MLUInt/MLInt have arguments {N, T}, so the number of limbs is first, then the type. This is made by analogy with NTuple, for which this may be more logical, but for multi-limb integers the order may be better reversed.

Although, to be fair, it is exclusively a cosmetic change, since it is no problem to generalize the first type argument explicitly when necessary: MyType{Int, Bool} <: MyType{T, Bool} where T.