C++ extensions for readable event-driven programming