6 ms·
They should add `pure` function attribute instead, also maybe the ownership.
by xvilka 5y ago
They should add `pure` function attribute instead, also maybe the ownership.
- nuerow 5y ago> * They should add `pure` function attribute instead, also maybe the ownership.* The C standard committee only adds suggestions that have been presented. If you feel strongly about those features, feel free to put together a proposal like the one that sparked this discussion.
- Ginden 5y agoI have experience with proposing new features to languages and that's taxing. You have to deal with constant bikeshedding, provide rationales, states of art analysis for different languages etc. And your proposal can be still stalled for political reasons - eg. there is another proposal and it's expected that certain behaviour will be consistent between both.
- elteto 5y agoI think there’s a very high bar to clear to choose any other keyword than “constexpr”. With “constexpr” code can be compiled without change (at least in this regard) with C or C++ compilers, the keyword is the same. Good C and C++ interop is extremely important. If you choose any other keyword we will end up with nasty macro ifdefs to detect C or C++ and choose the appropriate keyword. And worse, the burden will be on the programmer to do this.