3 ms·
C++ had a dynamically typed variant that was useless and got deprecated (and eventually dropped) a few standards ago.
by gpderetta 5y ago
C++ had a dynamically typed variant that was useless and got deprecated (and eventually dropped) a few standards ago.
- pjmlp 5y agoIt was deprecated in C++11, and a removed in C++17, yet now they are discussing adding it back in a flavour similar to Swift, so apparently there is some value into it. So here you go, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0709r4.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p070... As for being useless, well that is the usual argument from no exception, no RTTI folks, that would be better off using another language instead of messing up with C++'s design.
- gpderetta 5y agoI'm very much in favour of statically checked exceptions (and noexcept is sorta-kinda like that). It is the old dynamically typed style which was little more than an assertion that wasn't very useful.