5 ms·
Which other languages use the C/C++ preprocessor? I've seen it used for generating data or other source code when a preprocessor comes in handy, but never as a
by pmr_ 13y ago
Which other languages use the C/C++ preprocessor? I've seen it used for generating data or other source code when a preprocessor comes in handy, but never as a full-fledged component of another language.
I also think that a modern language that uses includes instead of modules is just outright insane.
- plorkyeran 13y agoObjective-C(++). I don't think obj-c changes anything about how the preprocessor works, so presumably it'll work fine for that. Using the C preprocessor in a non-superset-of-C language would be a pretty odd choice.
- duaneb 13y agoObjective-c introduced `#import`, which guards from double including by default. I would suspect and performance gains are tempered with a "pure" objc project.
- aidenn0 13y agoMany assemblers have the option to use the c preprocessor.
- nemetroid 13y agoThe Glasgow Haskell Compiler has a language pragma for running CPP before compilation. I've seen it used a few times, for #ifdef compatibility between Windows and Linux for low-level stuff. I don't think anyone would ever want to use #include or macros, so the issue of speed is not very interesting in that context. example: http://hackage.haskell.org/package/system-filepath-0.4.10/docs/src/Filesystem-Path-CurrentOS.html http://hackage.haskell.org/package/system-filepath-0.4.10/do...