Why C# doesn't have macro like C++
-
is it C# support macro like c++? if not Why ? is it any standard they are following. In C++ we can do MUL(X,Y) X*Y like this.
-
is it C# support macro like c++? if not Why ? is it any standard they are following. In C++ we can do MUL(X,Y) X*Y like this.
See this MSDN blog[^]
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
is it C# support macro like c++? if not Why ? is it any standard they are following. In C++ we can do MUL(X,Y) X*Y like this.
These are different languages, with different features, that's it. This question is kinda like a holywar starter :)
Regards, Lev
-
is it C# support macro like c++? if not Why ? is it any standard they are following. In C++ we can do MUL(X,Y) X*Y like this.
- Just because you *can* do something in C++, doesn't mean you should. 1) Macros can be used to circumvent the strong typing requirements of C++. Side effects are possible, and that's bad. 2) Macros cannot be debugged. Macros that contain code are evil and should be avoided whenever possible.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
These are different languages, with different features, that's it. This question is kinda like a holywar starter :)
Regards, Lev
Thanks for your reply
-
See this MSDN blog[^]
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)Thanks. this is a exact link.
-
- Just because you *can* do something in C++, doesn't mean you should. 1) Macros can be used to circumvent the strong typing requirements of C++. Side effects are possible, and that's bad. 2) Macros cannot be debugged. Macros that contain code are evil and should be avoided whenever possible.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
is it C# support macro like c++? if not Why ? is it any standard they are following. In C++ we can do MUL(X,Y) X*Y like this.
Using macros, you can redesign your coding 'language' on the fly until your code doesn't even remotely look like C++. If you've seen as much bad C++ as I have, you know why many consider macros evil.
David Anton http://www.tangiblesoftwaresolutions.com C++ to C# Converter C++ to VB Converter C++ to Java Converter VB & C# to Java Converter Java to VB & C# Converter Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: convert VB, C#, or Java to C++