Thread: Arrow buying
View Single Post
  #9  
Old 02-01-2011, 03:56 AM
Cloven Cloven is offline
Delteria
Cloven's Avatar
Join Date: Dec 2006
Location: Florida, United States
Posts: 542
Cloven has a spectacular aura about
Send a message via AIM to Cloven
Quote:
Originally Posted by Tigairius View Post
I agree here, usually events only start with "onMyFunction." If it's simply a method to purchase an item you should be using "function purchaseItem" instead of "function onPurchaseItem" unless you trigger the event from trigger() or a scheduleevent(). Naming a function with the prefix of "on" basically is saying you don't expect a return value.
I generally agree, though I don't think it's a big deal really...

Some people prefix their functions in that fashion for added readability. This is largely because many jerks create unintuitive names for functions, or their code is haphazardly styled. In those cases the 'Find' feature can be rendered almost useless. As such, scanning for the 'on' prefix can be of use in those cases.

For people who practice poor function and/or variable naming... @ you.


Reply With Quote