What is differences between macro and template?
his is another installment in my HLL development. So don’t read these unless you’re interested in language implementations. I’m so glad I’ve put in Macros into the low-level section of the language. It will make things much easier. I was having a problem dividing what gets executed and what gets simplified down. The fun part about these macros is that you write them just as you would regular functions, but they can return alternate code or even plain data. Here’s an example: Function int32:myfunc(int32:src1 int32:src2) myfunc <- src1 + src2 Function. Macro int32:myfunc(int32:[bool:constant<-true]… int32:[bool:constant<-true]:src2) myfunc <- src1 + src2 Macro. What's the difference between the two? One gets executed at runtime, the other at compile time. The compiler always takes the function or the macro with the most similar type. While adding two constants would certainly be allowable in the first "function", the second one is a better match because of the "constant" requirement. Bec