Typical security issues in C++: why the GC isn't your enemy
deadalnix
deadalnix at gmail.com
Tue Dec 6 13:33:12 UTC 2022
On Tuesday, 6 December 2022 at 10:03:24 UTC, Arjan wrote:
> On Monday, 5 December 2022 at 23:58:58 UTC, Timon Gehr wrote:
>> On 12/5/22 20:57, H. S. Teoh wrote:
>> Default initialization does not even fix all initialization
>> issues, it just makes them reproducible. Anyway, I think
>> neither default initialization nor uninitialized variables are
>> the right solution, but you kind of have to do it this way
>> given how scoping works in C++ and in D.
>
> Now I'm curious, what, in you opinion, would be best for
> initialization?
> How is C++/D scoping limiting in this?
Compiler can do control flow analysis, so they can force you to
initialize things before you use them. This is the right solution
to that problem.
More information about the Digitalmars-d
mailing list