Talk:Signals and slots
|WikiProject Computing / Software|
- 1 this is just the observer pattern
- 2 Really a stub?
- 3 "No common implementation in plain C"
- 4 Shouldn't this page also discuss advantages and inconveniences of signal/slot vs callback mechanism?
- 5 Isn't this the old Microsoft Windows 2.x/3.x/etc message passing mechanism with more syntactical sugar?
this is just the observer pattern
AfD Wikidrone 22:34, 2 June 2007 (UTC)
Signal slot mechanism isn't introduced with Qt, you should cite a precise source for this.
Anyway these are examples of C++ applications that uses the mechanism since 1992 http://portal.acm.org/citation.cfm?id=1125087&dl=GUIDE&coll=GUIDE&CFID=42502829&CFTOKEN=12543122
Previous work can also exist, but I have only found these as a part of the state-of-the-art of my project.
Really a stub?
"No common implementation in plain C"
GLib seems pretty commonly used to me...
Shouldn't this page also discuss advantages and inconveniences of signal/slot vs callback mechanism?
- if a signal is misspelled, there won't be any warning, and nothing will happen at runtime. possibly a warning will be issued to indicate that a slot was not found.
- callbacks explicitly indicate who is interacting. for example, a (C++) class could declare an interface (e.g. inner class) that it expects its callees implement. This enforces that all necessary callbacks are effectively implemented (otherwise the compiler or linker will complain about missing code).
- signals/slots allow for an arbitrary set of connections — Preceding unsigned comment added by Axd (talk • contribs) 09:01, 1 August 2012 (UTC)
Isn't this the old Microsoft Windows 2.x/3.x/etc message passing mechanism with more syntactical sugar?
If you've ever programmed using the old Windows Software Development Kit or from Charles Petzold's old "Programming Windows" book(s), you would recognize this as such (or similar).