Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why is C++...

Name: Anonymous 2011-12-07 12:06

...so bad? Why does it have such a bad reputation?

I'm an experienced C++ programmer and, while the language has warts, I can't understand the reason for the enormous amount of criticism against the language.

I'd like to hear the honest opinions of /prog/rammers in this regard.

Name: F r o z e n V o i d !!mJCwdV5J0Xy2A21 2011-12-11 3:53

I don't usually consider macros as "important" part of language, more like generic building blocks to save the building time.
You use C macros not to invent a mini-language but to do what macro is intended to do since first assembler macros:
to save typing time. Abstraction level of macro is just a bonus, not something C macros are very good at(its just text juggling).
You could just as well remove or expand macros yourself, with some productivity loss. it won't change a single thing in C.
In Lisp you really need the macros, or the language would feel crippled. Macro extends lisp since the syntax/functionality extension via new functions to macro is trivial: lisp functions are forced to be syntax-free soup of words which can be macroed to infinity with prefix notation: it will just be a stack of macro on top of macro on top of macros....plus its abusing the entire language power at runtime.
If you don't find this unmaintainable and complain about simple C macros which are pristine sights of clarity and simplicity compared to Lisp macros which are using everything to manipulate code(as i understand you can also manipulate string of C code and output it similar to this but the process will be incredibly messy compared to plain C macros(it would be emulating a Lisp interpreter at run-time to construct the final code and compile/execute it) and much longer, so normal C programmers avoid this type of design).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List