Sujet : Re: constexpr keyword is unnecessary
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 13. Oct 2024, 14:35:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vegia7$mofs$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 13.10.2024 15:14, Bonita Montero wrote:
Am 13.10.2024 um 15:09 schrieb Thiago Adams:
Em 10/13/2024 9:58 AM, Bonita Montero escreveu:
Am 13.10.2024 um 14:38 schrieb Thiago Adams:
Em 10/13/2024 8:49 AM, Bonita Montero escreveu:
>
constexpr doesn't hurt.
>
It spreads confusion, ...
It can be understood in 10s.
I doubt that. - If you need a technical term for some "internal"
requirement you typically need a lot of background information
that (usually?) is pointless to a programmer.
What do I (in my role as a solution programmer) gain from it?
In that role specifically, but also generally, I think that
everything that a programming language can do under the hood
should not be a (concept-)burden to the programmer.
(Note that I'm not arguing against it.)
... and makes code incompatible with previous versions of C "for free".
New improvements are always incompatible and there are mature C23
compilers.
What do I (in my role as a solution programmer) gain from it?
Is it "necessary" (as the topic formulates it)?
Is it reasonable to subsume it with the "const" keyword, as the
OP suggests. - I am honestly asking, and interested in whether
that makes sense or not. (Yet I haven't seen a clear answer, or
maybe I have missed it.)
Janis