Subject: Re: [std-proposals] Reserve good keywords for floating point types
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-10-15 01:42:07
On Monday, 14 October 2019 20:35:00 PDT Lyberta via Std-Proposals wrote:
> The problem is that in this case beginners will probably continue to use
> float and double because they look more legit.
> The guidelines then become:
> Use std::[u]intN_t for integers.
> Use bool for boolean.
> Use std::byte for bytes.
> Use std::floatN for floats.
> Use charN_t for Unicode code units until better types become available.
> Which means that most fundamental types should be avoided in modern
> code. Do we want to live with language whose fundamental types are broken?
They are not broken. Neither int nor double are.
If you need specific format or bit-width, then you use the one with that in
the name. If you don't and you can just live with whatever size the compiler
wants to give you, use that.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel System Software Products
STD-PROPOSALS list run by firstname.lastname@example.org
Standard Proposals Archives on Google Groups