[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Strengths/Weaknesses and usage info
- From: Reuben Thomas <rrt@...>
- Date: Sat, 19 May 2001 15:29:30 +0100 (BST)
> If I could specify types, this would be simple, it would say:
>
> ge_collision = function(self,number x,number y,Sprite whoIhit)
There's nothing to stop you putting this sort of information in comments,
although admittedly because Lua's only comment style is a rest of line
comment, this is hard to do in the obvious way:
go_collision = function(self, /* number */ x, /* number */ y, /* Sprite */
whoIhit)
But still, you can write the type in a LuaDoc-style comment. I admit that
this sort of thing requires discipline and a type system that makes you do
it is better.
--
http://sc3d.org/rrt/ | Quidquid latine dictum sit, altum viditur (Anon)