27

In a German programming forum we currently have a discussion about events and what you (grammatically) do with them.

The MSDN talks about "Event Raising" and "to raise an event". Thus, this seems to be one possibility.

Are there any other synonyms? What about "to trigger an event" and "to fire an event"?

A Google search will bring results for all of the three possibilities. This, however, does not mean that they are correct, too, of course. Are they?

Are there any stylistic or other differences, or are they used in different contexts?

3
  • 4
    As far as I'm concerned all three are valid, and I use all three interchangeable. May 22, 2010 at 15:40
  • 4
    I think I'd prefer to think "trigger" would refer to some condition/action, while "fire"/"raise" refer more to implementation details. I.e, "We fire/raise the XYZ event in line 459" or "function foobar raises/fires the event XYZ", as opposed to "clicking on this triggers the XYZ event", or "event XYZ is triggered whenever the foo counter reaches zero."
    – Amadan
    May 22, 2010 at 15:56
  • 1
    Emit is another good option Jul 20, 2021 at 2:22

2 Answers 2

25

These are all acceptable. Microsoft standardized on "raising" an event because it sounds less provocative.

Eric Lippert mentions the rationale on his blog: "the usage committee people felt that between "raising" and "firing", they'd pick the less bellicose-sounding one..."

This is also mentioned in the framework guidelines: "Do use the raise terminology for events rather than fire or trigger."

3
  • Thanks! Especially the link with the framework guidelines is very helpful!
    – Matthias
    May 22, 2010 at 15:58
  • 21
    A friend of mine forgot to remove some javascript debugging code from an internal timesheet application once: alert("Fired"); (he was making sure a particular event was raised). It caused quite a stir because when some employees logged on, they thought the alert box meant that they had been fired from the job. Feb 6, 2014 at 19:28
  • 1
    What a funny javascript joke! :)
    – JLavoie
    Jan 20, 2016 at 3:04
1

By reading a best seller book on JavaScript, I noticed the author was using the following terminology:

  • the browser or a web page or a HTML element raises an event
  • the event fires
  • the event triggers a script
  • the script responds to en event
  • the event targets the browser or a web page or a HTML element

I wrote the diagram below to summarize the terminology about events

flowchart diagram with terminology

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.