Saturday, August 19, 2006

A little bit on nomenclature

Intended audience: all C# developers This post is inspired on my last post (on events). In that post I said that an event is raised, and I chose not to use the terms thrown or fired. Using consistent naming is important, so I made up this little list of the most commonly used verbs when you want to communicate about what your code is doing:

  • A method is invoked or called by its user.
  • An event is published by its publisher, and subscribed by one or more subscribers.
  • An event can be raised (not fired or thrown!) by the publisher, and will be handled (not catched) by the subscribers.
  • An exeption is thrown and can be catched. When nobody catches the exception it is uncaught or unhandled.

If someone can lead me to a more official source of how to name these things, feel free to do so. It just bothers me that I see these terms mixed up so much.

Kristof

3 comments:

Anonymous said...

Of course 'uncatched' sounds silly.
In English we would say 'Uncaught'.

Kristof said...

Thanks! You can see that English is not my native language. I'll update the post.

Unknown said...

what if one needs synchronous rather than asychronous behavior? How does one do BeginInvoke() in this case?