[fpc-pascal] Proper preprocessor?

Ryan Joseph ryan at thealchemistguild.com
Wed Jun 20 15:29:21 CEST 2018



> On Jun 20, 2018, at 8:09 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> Nothing stops people from preprocessing their code if they need really
> advanced preprocessing: The toolchain can handle it already.
> 
> But there is no need to integrate it in the compiler and thus needlessly
> complicating it even more. The consequences of such a step are far-reaching.
> 
> And till now, no-one has presented the really pressing use cases that would warrant such a step.

How can you integrate a preprocessor without misaligning error messages and debugging information? I would have already done this myself if I thought it was possible. A way to hook into the compiler to run external programs would be very handy and let us craft our own solutions without adding junk into the compiler.

I put this into the category of dogma because we’re being asked to provide “valid” use cases instead of trusting that we have know what’s best for our own code. It’s not possible to know in advance what people may need so providing them good tools as a fail safe is only sensible.

My own case I had just know was hard coded some vertex data from a C program and if I had a good macro syntax I could have finished it much quicker and it would have looked nicer. It doesn’t matter if this was “best practice” or not. I just wanted to finish it so I could move on to more important things.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list