Hacker News new | ask | show | jobs
by kibwen 3400 days ago
> A macro processor is not of the language; it is above the language.

Then feel free to use the C preprocessor with Rust, it works just as well. :P Just like it does with Python, and Java, and...

2 comments

The C preprocessor can only be used with Python as long as you don't do anything multi-line:

   #define whatever(param) \
   foo: \
      bar \
      baz

I made a preprocessor some 18 years ago that could be used with Python.

Wayback Machine:

https://web.archive.org/web/20000815202258/http://users.foot...

Better yet, use m4.