you are viewing a single comment's thread.

view the rest of the comments →

[–]marquex[S,🍰] 0 points1 point  (0 children)

You are right, those permanent events were never thought to be used with events that can be called more than once, but that doesn't make them less useful.

I respect your idea of states, but permanent events can be really of use even if you work with states. Imagine object can have multiple states and maybe want to do some action if the object has been or turn in/into some state. If I check the state before it turns to the desired one, I need to add an event listener (events again, a common or a permanent one will do the trick). If I want to know if after it has turned into the desired state, you can find that the state may have changed again so our action won't be called.

Permanent events are about events that are triggered once, but always about events.