On Fri, 2021-11-26 at 05:53 +0000, workman via Digitalmars-d-announce wrote: > If you can only create C++ class object but can not destroy them, > and can not support dynamic cast, then C++ class object is not > working. > > Maybe the title could be "You can use C++ in betterC but they are > not working", or add into prefaced section. > > There is no roadmap about when it could be work, or plan to fixed > should also be mentioned.
You can do both things, according to the current language specification. The destructors may have bugs, but you should be able to do destruction in a correct implementation. The dynamic cast is perfectly doable too, you just need to implement your own typeinfo, and it is not that hard and unusual. A clear example of that is LLVM. They use their own implementation of TypeInfo, see [here](https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html). So, arguing that classes doesn't work just because RTTI is not an intrinsic is not fair. The whole point of betterC is to prohib the usage or the runtime hooks or depend on any runtime related symbol and, in C++, std::type_info and typeid() is an interface provided by the C++ runtime, similar to D runtime. -- Sincerely, Luís Ferreira @ lsferreira.net
signature.asc
Description: This is a digitally signed message part
