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

Re: Pre-RFC decimal data type

Thread Previous | Thread Next
Darren Duncan
August 6, 2021 00:04
Re: Pre-RFC decimal data type
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About