DIP: @mustuse as function return value annotation
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Mon Aug 12 08:11:58 UTC 2024
On 12/08/2024 8:09 PM, mw wrote:
> I have no idea how the current D's compilation model works.
>
> To implement what is proposed above, I assume there is only one global
> ASTree (singleton) of all the source files (even in the context of
> separate compilation of each D source file), which holds all the
> calculated annotation from different compilation passes, and the
> @mustuse checker is invoked after all the annotations are fully calculated.
That works for one process invocation.
But D is multi-process invocation.
A process is built by multiple compiler executions and do not share this
knowledge.
This information simply wouldn't exist for later stages of compilation.
More information about the dip.ideas
mailing list