@cstjean Actually, your @nemo idea could be useful to solve another problem we have. When entering a power series over Flint rationals, we used to have to do something like the following (though someone just pointed out to me we already solved this another way):
f = ZZ(1)//2 + ZZ(3)//7*x + O(x^7)
Things like this are incredibly fiddly to write. Of course Flint prints this as:
1/2 + 3/7*x + O(x^7)
which can’t then be copy’n’pasted back into the Julia REPL. (We can define custom print functions of course, but working with a system which prints all its results in such an obfuscated form is difficult to say the least.)
If we implement an @nemo macro, we could have:
@nemo 1/2 + 3/7x + O(x^7)
which would basically do what we wanted, and (mostly) solve the cut’n’paste problem, especially for very large expressions, or expressions that don’t come from Julia.
It’s still a little difficult to distinguish BigInt and Int constants when working with Julia types. But it totally solves the problem of working with Flint BigInts, which is the most common case where this occurs.
The sensible thing to do in the pure Julia part of Nemo that we plan to split off is probably to make @nemo default to BigInt’s. It’s less likely people will really want to do power series over Julia Int’s. And if they do, they don’t need the macro anyway.