>>4
Ironically, Lisp is the one that needs it the most.
Name:
Anonymous2011-12-31 18:38
>>5
public class Poo {
public static void main(String[] args) {
//#if defined(poo)
System.out.println("Poo is ${poo}");
//#else
System.out.println("Poo is not defined");
//#endif
>>13
can you do this:
#define suck_my_dick_and_call_me_willy #define
suck_my_dick_and_call_me_willy david int main() { \
puts("suck it"); \
return 0;
} \
>>14
Why would you even want to? I'm guessing you're a pretty bad programmer if you're impressed that the C preprocessor can do simple string substitution.
>>18 write a program that takes an input, saves it into the source, and re-compiles itself? (what can't C do... ;)
Then you're just writing your own preprocessor. Also, that argument is like claiming that all languages are equally powerful because they're Turing complete. Of course it's possible to do something like that in C, what matters is how easy it is.
btw seems hardly more useful than #14's code
I didn't say it was useful. My point is that, unlike C's preprocessor, Lisp's macro system is not just a slightly more powerful sed.
yeah, it can be done, but it is a pain. If those types of capabilities are built into the language, then implementing it will be whole lot easier, and you wont need to worry about bundling your preprocessor with your code. Also, if people use standard macro writing facilities instead, it will be a lot easier to use macros from multiple writers. It would be much more difficult to try to use two different people's preprocessors. The two preprocessors might even by incompatible if they get hung up on each other's syntax.