develooper Front page | perl.perl5.porters | Postings from August 2021

Re: Pre-RFC decimal data type

Thread Previous | Thread Next
From:
Darren Duncan
Date:
August 6, 2021 00:04
Subject:
Re: Pre-RFC decimal data type
Message ID:
a73f86d9-55a1-aed4-ac1a-9fe4c79cebc4@darrenduncan.net
On 2021-08-05 9:53 a.m., Harald Jörg wrote:
> To add to the Java misery: If you retrieve a Java BigDecimal, e.g. from
> a database, and want to add one, you need to create a new object:
> value = value.add(new BigDecimal(1)).  Compare that to Perl's $value++.

I would consider creating a new object to be a feature rather than a misery. 
Numbers should be immutable. -- Darren Duncan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About