Re: Re: Scripting Systems

Ignacio Castaño <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
Brian Hook wrote:
>>You can do that without "hacking" lua. This is from the top of my
>>head, but if you want to follow this direction I can provide a more
>>detailed explanation
> 
> This catches assignments at run-time though, not at compile time, 
> correct?

ups, should read mails more carefully! yes, that catches errors at run 
time only. It's not possible to do that at compile time without fully 
redesigning the language. However, that allows you to catch errors 
earlier, and provides a descriptive error message to let you know what's 
going on.

ie. If you use 'healht' instead of 'health' in your 'weapon_hit' 
function, at runtime you wouldn't know why can't you kill your target, 
but with the newindex metamethod those errors would show up as soon as 
the offending code is executed.

In my experience (that's not much :D), this kind of runtime checks and a 
proper test suite can be really helpful.


-- 
Ignacio Castaño
[email protected]



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.