Loading AI tools
From Wikipedia, the free encyclopedia
C++ Seminar
Topic: C++ quirks and misconceptions
I've often been surprised about certain aspects of C++, and guilty of glossing over some pretty important features and designs. So I'll attempt to power over a bunch of concepts:
Topic: Callbacks in C++
Tagline: Improve your code, by knowing how to NOT use signals/slots
I've noticed there's a lot of misunderstanding/misconceptions/avoidance with regards to callbacks, and a lot of a abuse of the signal/slot paradigm as a result.
My goal for the seminar will be to start from the basics, (getting an address of a function) -- working through function pointers (and syntax), to why you need arbitrary data (and how to do it) to member function pointers (and syntax) to generalized callbacks (and how to do it, and how to template it).
I will then hope to convince you of the merits of callbacks, and show you how they're more general, more expressive and faster (for both the machine and programmer) than Qt Signals / Slots. I'll attempt to show how they can be used both internally and for also making far cleaner APIs (using QtNetwork as an example)
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.