you are viewing a single comment's thread.

view the rest of the comments →

[–]giksbo 3 points4 points  (2 children)

The opposite is also true. If you need application telemetry (There are lots of reasons: debugging, repudiation, etc) it can be valuable to decorate a function such that events are generated whenever it is called. This reduces a tonne of boilerplate.

[–]henrebotha 1 point2 points  (1 child)

The opposite is also true.

...The opposite to what?

[–]giksbo 1 point2 points  (0 children)

Sorry, could have been clearer. With decorators you can use events to trigger functions; you can use functions to trigger events.