4 ms·
In principle Modules would be huge, but in practice you can't use them as the compiler you have doesn't implement them yet. C++ 20 gets a format feature that's
by tialaramex 4y ago
In principle Modules would be huge, but in practice you can't use them as the compiler you have doesn't implement them yet.
C++ 20 gets a format feature that's basically a weaker {fmt} library but as part of the standard library. A string formatting feature with reasonable performance and safety as you might be used to from other modern languages.
Concepts is nice, that's basically way to express duck typing, it is often described like you're getting more than duck typing but that's all you actually get - but hey, duck typing is useful, and Concepts should have decent error messages whereas doing the equivalent with SFINAE is a recipe for awful diagnostic output.
- ncmncm 4y agoPlease do not post falsehoods seeking to mislead readers. You have been corrected on this point several times before. In fact, C++ Concepts can be used for early enforcement of compile-time duck typing, just for better error messages. In the Standard library they are commonly used that way, for backward compatibility. But Concepts can also implement named-property matching. It is entirely up to the designer of a library how much of each to present.
- tialaramex 4y ago> You have been corrected on this point several times before. You have repeatedly (across numerous HN threads) insisted that Concepts aren't just duck typing but that doesn't make it so. > But Concepts can also implement named-property matching. That's still just duck typing (and it's awkward to do properly). Contrast with the (eventually abandoned) C++ 0x Concepts, which actually has semantic weight to it. Concept Maps allow C++ 0x Concepts to have some sort of chance in a language that's already in widespread use, because you can adapt an existing type to the Concept using a Map. But C++ 20 Concepts doesn't offer any of that, after about a decade it's just duck typing.
- deleted 4y ago[deleted]