3 ms·
Please 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 ear
by ncmncm 4y ago
Please 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.