Even if C++26 covers all scenarios needed for MOC, it is going to take ages until Qt can rely on it being available across all their customer platforms, unfortunely after a spike in the last decades regarding ISO C++ support, the compilers velocity has slowed down, while proprietary compilers have decided to freeze their support somewhere between C++14 and C++17.
Most likely the raise of AOT compiled alternatives, for scenarios where C and C++ were only being used due to being compiled languages, big names in C++ compiler world rather put money on their own alternatives, are the two main reasons of the slow down.
I used to use Qt quite extensively years ago, and it seemed that all MOC was really bringing to the table was signa-slot connections which can certainly be done in much nicer ways (e.g. just use std::function to represent signals).
Meanwhile, copperspice got rid of the MOC more than 10 years ago.
I'm no longer familiar with Qt nor C++, but I guess the real blocker here is that the Qt foundation is only looking for ways that are 100% backward-compatible to inccur no change in its commercial userbase? Or am I missing something more subtle?
Moc is complex. reflection is complex. round one was trying to be as simple as possible while still allowing some real world use and allow room for the future.
Most likely the raise of AOT compiled alternatives, for scenarios where C and C++ were only being used due to being compiled languages, big names in C++ compiler world rather put money on their own alternatives, are the two main reasons of the slow down.
- https://en.cppreference.com/w/cpp/compiler_support.html
- https://en.cppreference.com/w/cpp/compiler_support/17.html
- https://en.cppreference.com/w/cpp/compiler_support/14.html
I used to use Qt quite extensively years ago, and it seemed that all MOC was really bringing to the table was signa-slot connections which can certainly be done in much nicer ways (e.g. just use std::function to represent signals).
I'm no longer familiar with Qt nor C++, but I guess the real blocker here is that the Qt foundation is only looking for ways that are 100% backward-compatible to inccur no change in its commercial userbase? Or am I missing something more subtle?