(April 24, 2016 at 4:46 am)Cthulhu Dreaming Wrote:C++, it was.(April 24, 2016 at 3:41 am)pocaracas Wrote: The craziest thing I've seen is the equivalent of a function call as a pre-compiler define. As long as you keep variable names consistent...it works.
These are common in C (specifically the gcc compiler) , and they work exactly the same as ordinary functions - by the time they go from thr pre-compiler to the compiler, they are ordinary functions.
What language/compiler are you talking about?
And the purpose of it was to prevent function calls, added stack, and variable copying/passing.
We may think of those as "fast" events, but when every CPU cycle is precious, any trick is valid... Even if the CPU is an Octa-core, with hyperthreading and churning at some 3.6 GHz (a Xeon, I think it was).
Quote:The weirdest thing I've ever seen is everything written in Perl, ever, that was not used for listing rubbish. I have had to wrote - not by choice - far more Perl than I would wish to admit to.
I've only had to adapt a simple script in Perl, so I can't say much about it.