2 ms·
Qt's moc is a preprocessor/code-generator which compiles to standard C++. Do you also tell people that they shouldn't use flex/lex/bison/yacc/antlr/etc.? Why a
by mpyne 14y ago
Qt's moc is a preprocessor/code-generator which compiles to standard C++.
Do you also tell people that they shouldn't use flex/lex/bison/yacc/antlr/etc.? Why are those code generators/DSLs acceptable but the moc is not? It's not as if the Qt authors added it because they don't understand C++, they added it because it solves a vexing problem in C++ GUI design.
- qompiler 14y agoI would have agreed with you if Qt used something like the #pragma directive. Alas, they decided to inject keywords inside of the standard language which breaks every C++ compiler.
- mpyne 14y agothen... turn off the keywords? Every Qt "keyword" you talk about can be disabled with a fallback to namespaced macros. foreach -> Q_FOREACH slots: -> Q_SLOTS etc.