November 26, 2021
On Tuesday, 23 November 2021 at 05:25:46 UTC, Stanislav Blinov wrote:
> Maybe it's a language or cultural issue? I'm not being bashful. "Use classes", at least to me, means, well, "use classes", and not "use a subset of classes that's really not much better than structs as you can't fully support inheritance anyway because destruction is a mess".
>
> In other words, in order to fully appreciate the message of your article, one has to already be aware of all the other issues. Which is a dangerous presupposition for a public article, especially not prefaced accordingly.
>
>> Thanks for your input! I'm going to fix the issues you presented.
>
> You're welcome :)


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.
November 26, 2021
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



1 2 3
Next ›   Last »