Money type

bachmeier no at
Thu Jan 2 19:12:11 UTC 2020

On Thursday, 2 January 2020 at 19:03:47 UTC, Ola Fosheim Grøstad 
> On Thursday, 2 January 2020 at 18:30:54 UTC, bauss wrote:
>> You shouldn't even do money calculations on the client side 
>> and thus you only need the representation of it and hence you 
>> can just send it formatted as a string.
>> Of course if your client is not JS or anything similar then 
>> there is no problem since you can represent the value just 
>> fine.
> As I've pointed out double can represent anything you can 
> represent as 53 bits unsigned integers, so this is a 
> non-issue...
> It can be very useful to do calculations on currencies on the 
> client side, but you don't use it for any other purpose than 
> display.

I'll just throw out that Lua has no integer type:

I've never had a reason to avoid integers for performance 
reasons, but I suppose there are cases in which it's relevant...

More information about the Digitalmars-d mailing list