Macros?

BlitzMax Forums/BlitzMax Beginners Area/Macros?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I agree, macros would be useful, but AngelDaniel's concerns are misplaced. "Nested function calls" are not generally a problem. It is usually better to call a function from several places in your code than to inline the function. Why? Because the increase in code size causes more cache misses, and cache misses are *much* more expensive than executing the six or so instructions involved in a function call. Inlining is only a win for very small functions, and even then you have to be careful. Lots of C++ programmers, even those with exprience, tend to pointlessly inline things even though it's not providing any benefit.

Macros to rename functions would be handy.