Fare: Metaprogramming from the ground up: avoid C(fare.livejournal.com)
fare.livejournal.com
Fare: Metaprogramming from the ground up: avoid C
http://fare.livejournal.com/135078.html
5 comments
Can anyone explain why this takes so long to compile? It doesn't look that complicated.
Edit: I compiled with "gcc -O3 -s", which took 8 minutes, but the executable is only 4784 bytes.
Edit: I compiled with "gcc -O3 -s", which took 8 minutes, but the executable is only 4784 bytes.
The long compilation time is due to the optimization options. Without optimization it compiles in a few seconds.
Yet, the macros leave plenty of space for optimization. See the size of your executable compared to the unoptimized one of qwph above.
Yet, the macros leave plenty of space for optimization. See the size of your executable compared to the unoptimized one of qwph above.
"Like Perl, C++ is a swiss army chainsaw of a programming language. Unlike Perl, it's got all the blades simultaneously and permanently cast in a fixed half-open position. Don't turn it on."
Priceless.
Priceless.
Uhm, I find this post kind of uninspired. Did it really require experimental verification to show that meta-programming in C probably wasn't a good idea?
I find this sort of argument in general a bit straw-man-ish. They use a programming language for something it's not suited for and then reflect that back on the programming language.
I find this sort of argument in general a bit straw-man-ish. They use a programming language for something it's not suited for and then reflect that back on the programming language.
I'm slightly disappointed that
didn't die, although it did produce about 750k of output, which is quite impressive...