On Thursday, 6 April 2017 at 01:21:48 UTC, Walter Bright wrote:
On 4/5/2017 1:50 PM, H. S. Teoh via Digitalmars-d wrote:
Who says you can't use a preprocessor with D code? ;-)
There are some issues with it. The C preprocessor is defined to
work on "preprocessor tokens", which are not quite th
On Wed, Apr 05, 2017 at 06:21:48PM -0700, Walter Bright via Digitalmars-d wrote:
> On 4/5/2017 1:50 PM, H. S. Teoh via Digitalmars-d wrote:
> > Who says you can't use a preprocessor with D code? ;-)
>
> There are some issues with it. The C preprocessor is defined to work
> on "preprocessor tokens"
On 4/5/2017 1:50 PM, H. S. Teoh via Digitalmars-d wrote:
Who says you can't use a preprocessor with D code? ;-)
There are some issues with it. The C preprocessor is defined to work on
"preprocessor tokens", which are not quite the same thing as text.
D doesn't have a preprocessor, and for good reason, as it can allow all
sorts of hard-to-find bugs and other issues that make code hard to
maintain / understand.
However, some time ago I found an occasion where it was useful to run D
code through a C preprocessor before handing it to the D compile