lua-users home
lua-l archive

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


Steve Dekorte wrote:


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 how about:

-- parameters:  x,y  - location of collision, whoIhit - the colliding Sprite
ge_collision = function(self, x, y, whoIhit)

Lots of options for documenting code that don't involve changing the language.


Jason
379