For a variable that holds currency, such as $, that has only two digits after decimal-point representing cents, isn’t it better to define it as Numeric 2 instead of Decimal? Or is there any underlying difference that one should be aware of?
Decimal is an alias for Numeric 10, so in principle there is no underlying difference except for the number of decimal places.
Whether 2 or 10 decimal places is best for your use-case will of course depend on said use-case.
I think the advantage I see when using Numeric 2 is that prints are cleaner with only two digits after decimal-point instead of so many trailing zeroes.
Most of the code examples for Daml-learners have used Decimal for currency so I wondered.