ID:2841353
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
Currently, in order to call a macro over multiple lines, you need to use backslashes.

DO_SOMETHING( \
thing, \
thing2 \
)


This is unlike procs, which support this fine:

do_something(
thing,
thing2
)


This is also unlike C++, where this works fine:

#include <stdio.h>

#define ADD_NUMBERS(x, y) x + y

int main() {
printf("%d", ADD_NUMBERS(
1,
2
));
}
+1, would be nice
I still really want this because I want to be able to do something like:

- Statically lint for required arguments (macros do this, though BYOND should likely have this built in somehow)
- Statically lint for CONSTANT arguments (a future improvement to SS13 logging is going to include requiring that a string is not templated, for reasons)
Oh, and also because __IMPLIED_TYPE__ was implemented to only work in macros (🙁) this is also made even more tantalizing. I do not want contributors to have to guess which "procs" need backslashes and which don't.
+1, would make macros a lot more readable