lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



David Jeske wrote:
ge_collision = function(self,number x,number y,Sprite whoIhit)...

...and now everyone knows exactly what object type "whoIhit" is.

You might try using a naming convention when the type isn't clear:

ge_collision = function(self, x, y,whoIhitSprite)

Or better yet:

function ge_collisionAtX_Y_with_(self, x, y, aSprite)

This way a developer who looks at the method's use doesn't has to look at it's declaration to determine what the args are for.

Steve