Post B5LPdeGJp7sSk9EOgK by jenesuispersonne@piaille.fr
 (DIR) More posts by jenesuispersonne@piaille.fr
 (DIR) Post #B5LGsSSx456Wuk7wh6 by whitequark@social.treehouse.systems
       0 likes, 0 repeats
       
       we have RTTI at homei'll never get bored watching C++ developers reinvent dynamic_cast<>
       
 (DIR) Post #B5LGsSdERrKNQcw9ia by azonenberg@ioc.exchange
       0 likes, 0 repeats
       
       @whitequark I feel like a lot of these paradigms dated to very early C++ dialects that lacked features we now consider standard, or when they were considered insanely expensive.For example, MFC has CString which I believe predates std::string, and CPtrList which is effectively a linked list of void*s.Then CTypedPtrList was added on top of that as a templated typesafe wrapper.
       
 (DIR) Post #B5LH3ZOVe5wVaULcvY by dotstdy@mastodon.social
       0 likes, 0 repeats
       
       @azonenberg @whitequark in xcb it's a c api as well, so cannae do the dynamic_cast regardless. but yeah dynamic cast still *is* insanely expensive on msvc... :/ (not that the cost would really matter for something like handling xcb messages which isn't going to be fast enough to write home about however you slice it)
       
 (DIR) Post #B5LPdeGJp7sSk9EOgK by jenesuispersonne@piaille.fr
       0 likes, 0 repeats
       
       @azonenberg @whitequark For MFCs, it's worst than that, it's a C++ abstraction of C code.Even Microsoft wrote years ago that Visual C++ 6 compiler is unable to compile C++, it translates it in C then compile.And it was the reference compiler for Windows platform until 2005.