mixin D code into D code

Vladimir Panteleev thecybershadow at gmail.com
Tue Feb 6 21:36:23 PST 2007


On Wed, 07 Feb 2007 02:06:44 +0200, John Reimer <terminal.node at gmail.com> wrote:

> On Wed, 07 Feb 2007 05:13:06 +0900, Bill Baxter wrote:
>
>> Also, people download and run makefiles to build their software all the
>> time. Who knows what that makefile is doing.  There could be an rm -rf /
>> buried in there somewhere in all that tab-sensitive gobbledy-gook.
>
> Very good point.
>
> Any auxillary tool in the compilation process could could do the same.  I
> have difficult recognizing the validity of Walter's concern in this context.

I believe there must be a strict distinction between tools which just work with data or code, and tools which run code. The sole definition of a compiler is transform human-readable code to machine code - not run any of those outside the purpose of generating other code or data.

Unit tests are a separate issue, because to run them the user must specify a switch on the compiler's command-line - in which case he is well-aware that code will be run. Thus, if any such feature does get implemented, the compiler should not execute any code and give off an error instead, and force the user to specify a switch which allows this, to prevent any naive mistakes and annoyances.

That, or write in big letters on the DMD download page... "This compiler may run some of the compiled code" in big red letters. But that'll just scare more people off...

-- 
Best regards,
  Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list