On Sunday, 13 August 2017 at 19:51:31 UTC, Stefan Koch wrote:
On Sunday, 13 August 2017 at 19:47:37 UTC, Jerry wrote:
Seems like it'd be a good idea to pre compute all of phobos
for compile time computations, as they should be changing.
That would drastically reduce using any of phobos for compile
time computation.
You cannot do that.
The point of template code is that the user can change it from
the outside.
There is no way to precompute the reaction to things that are
yet to be realized.
The way compile time is saved here is by limiting the
flexibility.
There are ways to do it, not having to parse the code would make
it faster on its own. Compiling 500 source files individually
that starts and stops DMD is drastically slower than putting the
500 source files together and running DMD once. The tests that
are run for DMD for example could be made to run much faster.