On Friday, 21 September 2018 at 06:30:40 UTC, Walter Bright wrote:
On 9/20/2018 10:11 PM, mate wrote:
Note that the build can be done at compile time because the metaprogramming capabilities of the language are not limited in terms of system calls.

Back in the naive olden days, Microsoft released ActiveX, where a web page could load executable objects (!) from the internet and run them in the browser.

It quickly became apparent that this was a disaster, as lots of people on the internet aren't to be trusted.

CTFE on D doesn't allow making any system calls. This is on purpose.

The usual argument against this is that source code distributions already usually include some sort of build or installation script (be it in the form of "configure", or a makefile, or a Visual Studio project), which can already execute arbitrary commands.

The problem with putting it in the compiler is that it invalidates many contracts (and, thus, use cases) about what invoking the compiler can do. This means you can't bisect or reduce (as with Dustmite) the source code reliably. Reproducible builds are out too, as the produced object file is no longer purely a function of the source code and compiler version.

Reply via email to