RE: Lua Strengths/Weaknesses and usage info
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: RE: Lua Strengths/Weaknesses and usage info
- From: "Samson, Lyndon [IT]" <lyndon.samson@...>
- Date: 2001年5月21日 10:14:21 +0100
>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.
You could also include something like
assert(aSprite.instanceOf("Sprite") );
As the first line of the method. As type checking is most important during
development you
could remove these lines for speed/size gains when ready for release.
lcs