Compile time executable calling?

Paulo Pinto pjmlp at progtools.org
Sat Jul 13 01:26:34 PDT 2013


Am 13.07.2013 01:43, schrieb H. S. Teoh:
> On Fri, Jul 12, 2013 at 03:35:30PM -0700, Walter Bright wrote:
>> On 7/12/2013 3:12 PM, Timothee Cour wrote:
>>> I think the OP was refering to something different: ability to call
>>> an arbitrary executable / shell command during compile time of a D
>>> function, whereas optabgen is during compiling dmd itself:
>>
>> It's still the same idea - using external programs to generate source
>> code.
>
> This idea isn't new. lex/yacc (or their modern incarnations flex/bison)
> come to mind. The usage is a bit clunky, but the essence is the same.
>
>
>>> what we want to have is this:
>>
>> I do understand that. I'm just saying that this can currently (but
>> awkwardly) be done in the makefile.
>
> At what point does the balance shift from having such an ability
> built-in, vs. just using OS-level facilities for combining different
> programs? For example, one could pipe source through a program that
> performs arbitrary transformations on it, then pipe the result through
> the compiler. Or one can write a program that generates arbitrary source
> code and pipe that into the compiler.
>
> Presently, such things are easily handled by a modern build system (of
> which makefiles are a rather clunky implementation thereof).
>
>
> T
>

In most modern build systems you can easily achieve that via plugins.

Does DUB accept plugins?

--
Paulo


More information about the Digitalmars-d mailing list