5 ms·
I fail to understand either, but they say: > CopperSpice has been modified to remove moc, the Qt meta object compiler. Moc was removed to simplify the build pr
by fla 11y ago
I fail to understand either, but they say:
> CopperSpice has been modified to remove moc, the Qt meta object compiler. Moc was removed to simplify the build process, allow CopperSpice to be a standalone library, increase run time performance, and allow developers to utilize C++11 features.
So they replaced the moc functionality with some c++11 magic ?
- zerr 11y ago> So they replaced the moc functionality with some c++11 magic ? You mean they replaced moc magic with C++11?
- cjslep 11y agoAdvanced template metaprogramming is far less common of a skill than opening a generated source file and reading source code.
- zerr 11y agoWell, one of the aim of C++11 (and 14) is to make template metaprogramming much easier.
- emsy 11y agoTo the user it shouldn't matter wether you use a moc DSL or a template DSL. If you're a developer, you'll have to learn the innards of the moc on top of C++, which already contains templating anyway. When I first saw the signal/slot API, I wondered how they solved it and was dissappointed that they used a standalone tool for something that could've been solved with standard C++.
- stevejones 11y agoC++ is a far more common skill than moc. I know C++, I can barely get my head around writing a Qt app.
- 0xFFC 11y agoExactly , Even if TMP is much harder than MOC, TMP is standard , by forcing people to learn it they are not doing something wrong or ridiculous , but by forcing people to learn something specific to framework we are doing something wrong in my opinion {then why should we have standard at first place ? every one can create its own C++ }
- fla 11y agoI didn't realize the c++11 standard could make it possible to get rid of moc. Defenately better this way around ;) I can't wait to see this happening upstream for Qt5.
- pjmlp 11y agomoc magic for signals/slots was already possible with C++98, as proven by Gtkmm already back in 2000. http://libsigc.sourceforge.net/ http://libsigc.sourceforge.net/ But it required beefy template support, which would leave out some of the compilers supported by Qt (not only MSVC).
- pgeorgi 11y ago> So they replaced the moc functionality with some c++11 magic ? Given that signals and slots were already implemented with templates in 2002 or before (see http://ftp.gnome.org/pub/GNOME/sources/libsigc++/1.0/ http://ftp.gnome.org/pub/GNOME/sources/libsigc++/1.0/), there's probably no need for c++11 magic.
- guruz 11y agoIndirectly related blog post: "Can Qt's moc be replaced by C++ reflection?" http://woboq.com/blog/reflection-in-cpp-and-qt-moc.html http://woboq.com/blog/reflection-in-cpp-and-qt-moc.html