On 02/01/2015 12:12 PM, Marko Rauhamaa wrote: > Christian Gollwitzer <aurio...@gmx.de>: > >> Am 01.02.15 um 08:58 schrieb Marko Rauhamaa: >>> Qt gave up on C++ when it comes to callbacks ("signals") and went for >>> an apocryphal metacompiler. >> >> Yes, but only because C++ compilers were not good enough when QT came >> out, and later is was too late to change it to a templated system. >> Lookup libsigc++ http://libsigc.sourceforge.net/ which does the same >> using standard C++ and http://qt-project.org/doc/qt-4.8/templates.html >> for a reasoning of QT. >> >> In C++11 (supported by MSVC, g++, clang) there re also lambda expressions > > So please implement this small piece of Python code in C++ so we can > compare the idioms:
Honestly with the C++ standard library implementing std::function and std::bind macros, idiomatically it would look very much similar to the Python code you showed. -- https://mail.python.org/mailman/listinfo/python-list