Deutsch English Français Italiano |
<20241013112004.698@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.c Subject: Re: constexpr keyword is unnecessary Date: Sun, 13 Oct 2024 18:21:46 -0000 (UTC) Organization: A noiseless patient Spider Lines: 28 Message-ID: <20241013112004.698@kylheku.com> References: <veb5fi$3ll7j$1@dont-email.me> <vebp8r$3ok6d$1@raubtier-asyl.eternal-september.org> <vebpo5$3olu3$1@dont-email.me> <vebtjp$3p9sm$1@raubtier-asyl.eternal-september.org> <vebubq$3p8oj$1@dont-email.me> <20241013093902.884@kylheku.com> <veh0ks$p3c4$1@dont-email.me> Injection-Date: Sun, 13 Oct 2024 20:21:46 +0200 (CEST) Injection-Info: dont-email.me; posting-host="454007c070158e98cf39f60c65df0e7f"; logging-data="832693"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GiHJswVnq1gWLBO1l10brRNVUSq9fIs8=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:gcSOvbvFLAnE3z3Yy4nvcR0ykqs= Bytes: 1992 On 2024-10-13, Thiago Adams <thiago.adams@gmail.com> wrote: > Em 10/13/2024 1:39 PM, Kaz Kylheku escreveu: >> On 2024-10-11, Thiago Adams <thiago.adams@gmail.com> wrote: >>> What I am suggesting again is remove the keyword constexpr. make const >>> do that. >>> >>> Just to remember C++ was already like that before constexpr. In c++ >>> const could be used as constant expressions. >> >> Really? >> >> const int f(int x) { ... } >> >> says that calls to f can be evaluated at compile time? >> > > I am comparing what C have so far. Only variables not functions. What C has so far is just lagging behind the C++ constexpr. constexpr has to be consistent for variables and functions and everything else. Can you do it all with const, while retaining backward compatibility of programs that don't know anything about the new constexpr meaning of const? I am deeply skeptical.