>From a computer algebra point of view, I still find `uint` more interesting 
>than `Natural` types. There are some algorithms for reduction modulo p, where 
>you actually want the overflow to happen. You can sometimes detect it 
>mathematically speaking and correct the overflow for higher performance. I am 
>thinking of the reduction by the block-overflow algorithm in [Jean-Guillaume 
>Dumas, 2004, "Efficient dot product over Word-Size Finite 
>Fields"](https://hal.science/hal-00001380), for reference.

I am also reticent to use Natural types, since you can not convert back and 
forth with integers and most functions are written for integers in libraries. 
To me, this additional type add [ «color» to the functions just like 
async/await construct does in 
Javascript](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/)

To write functions independently from these type choice, we can use generics in 
the function definition. When functions we want to use come from 
external/standard library, we do not have the hand on it, which is frustrating, 
since it basically forces us to rewrite functions to accept Naturals.

Please correct me if I am wrong, I am not the best developer of the Nim 
community. I hope in fact that Naturals are not so coercive as I think.

Reply via email to