Question

From what I can tell, in Python and and Django, signals are simply delegated events. Is there anything that functionally differentiates them from the typical notion of events in C#, Java, ActionScript, etc?

Was it helpful?

Solution

Actually, "signals" have been around longer than events have. In the earliest usage, a signal was an asynchronous way for processes to get notified that events had occurred. Since Unix is much older than Django (and since a lot of the Django work came from pydispatcher, where the original stuff was done), the name has stuck.

Events are really signals, you might say!

OTHER TIPS

Signals typically have an association with an operating system facility and events are typically application-defined. In some technology stacks, the OS-level stuff may be hidden well enough that there isn't a difference in the API, but in others perhaps not.

Afaik Qt had the first signal/slot implementation. Qt's docs explain the metaphor: "A signal is emitted when a particular event occurs". The distinction is so subtle that the nomenclature has been blurred.

You might as well ask "Why aren't events simply called signals?". Differences in terminology happen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top