On Mon, Apr 8, 2024 at 5:06 PM Rowan Tommins [IMSoP] <imsop....@rwec.co.uk> wrote:
> If we ever do want to make decimals a native type, we would need some way to > initialise a decimal value, since 1.2 will initialise a float. My original suggestion was: - Add "default decimal" mode with the "declare" statement in the beginning of the file. With this statement, all decimal literals like 1.2 will compile to decimals internally, not to floats. - Add "(decimal) 1.2" typecast that will compile to a decimal number representation when there's no "default decimal" statement in the file. So users will be able to switch contexts explicitly and always know what they're dealing with. -- Best, Alexander.