View Single Post
Old 05-01-2003, 01:58 AM   #1
karlan
Member
 
Join Date: Apr 2002
Location: Brisbane Australia
Posts: 74
karlan is on a distinguished road
Unhappy

Having done 99% of my mud coding with circleMUD, I cannot speak for other code bases, but circle has a lot of macros in it. Now, personally I hate macros in general, they annoy me every time it comes time to debug, and since I learnt how to use inline functions before macros (I remained somehow ignorant of them for quite a while) I tend to use inline functions.

I guess I am generally curious about others opinions/preferences, I can definately see their uses.
Typing:
[code] if(EXIT(room, dir)) {.....[/quote]
is much quicker than
[code] if(world[room].dir_option[dir]) {.....[/quote]
but the same can be acheived with an inline function, and that is a very simple example, there are some multiline macros, that get really annoying as it is painful (particularly if you are lazy like me) to track down where in the macro the check is failing (given you know it should succeed)

Anyone?
karlan is offline   Reply With Quote