Struct should be invalid after move

burjui bytefu at gmail.com
Fri Nov 30 15:01:51 UTC 2018


On Tuesday, 27 November 2018 at 19:28:13 UTC, Steven 
Schveighoffer wrote:
> Note that complete flow analysis is equivalent to the halting 
> problem. So really, you can never get it perfect, and 
> therefore, there are always going to be some things you can't 
> catch. So it's impossible to fulfill that promise in any 
> compiler.

That's a straw man. I was not talking about complete flow 
analysis and getting it perfect. Some form of flow analysis is 
already build into DMD, so I suggest to:
1. At least enable it unconditionally
2. Improve it to account for more complex scenarios than simple 
null dereferencing

Anyway, the point I am trying to make here is that it's much 
better to make one compiler smarter, than to rely on many users' 
not-even-close-to-perfect discipline, and I think C++ proves it. 
Software development these days is too complex to comprehend 
without the help of tools, which must become smarter to really 
have an impact and stay in use.


More information about the Digitalmars-d mailing list