Purity, memoization and parallelization of dmd
Paul Backus
snarwin at gmail.com
Thu Jul 16 18:55:23 UTC 2020
On Thursday, 16 July 2020 at 18:21:11 UTC, Per Nordlöw wrote:
> What's the status/progress on making dmd (completely) pure?
>
> Is this task on somebody's agenda? If so, are there any big
> obstacles that currently has no clear solution or is just a
> very large pile of small ones?
>
> And, in the long run, will a pure compiler (finally) enable
> caching/memoization of, for instance, template
> instantiations/ctfe-evaluations and, perhaps further into
> future, parallelization of the compiler?
DMD uses mutable state for basically everything, so I don't think
it is likely to ever be completely pure. I believe there is an
ongoing effort to make individual functions pure when possible,
though I'm not sure how much progress is being made.
Template instantiations are already cached (which actually causes
buggy behavior, because they are not quite pure [1]).
[1] https://issues.dlang.org/show_bug.cgi?id=19458
More information about the Digitalmars-d
mailing list