Re: A few questions about scripting
Mike Shaver <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
I think type inference is the usual way. There is very little actual type instability on the web, for example, and your scripters are likely not much different. Mostly I care about things C++ can't express as types very well: called on right thread, not called with lock held, has some relation to other variable, is in a certain state. We use a tool to let us annotate for some of those things, which I wish we'd had a decade ago. Event based programming tends to wipe out type info anyway, since you get generic arguments to your handlers... and check their types at runtime. Modern JS engines run native code for all repeated code, or all code period, and some engines can get within 2x of msvc on naive matrix code. Lua is unlikely to be much worse, if at all. Mike On Apr 28, 2010 6:29 PM, "Douglas Cox" <[email protected]> wrote: > I take it that you don't require unit tests for your gameplay code? How does one make a unit test for a line of script in a trigger's "OnEnter" event passing values of the wrong type to a function it calls? I'd love to have more unit tests. In fact we're making sure a nice unit testing framework is one of the features of the new code, but I'm not sure how you can have complete coverage. Isn't the unit test in a case like this handled by the compiler verifying your arguments are the correct type? -doug On Wed, Apr 28, 2010 at 6:23 PM, Jon Watte <[email protected]> wrote: > >> > >> >From what we've seen with a more dynamically typed language, you end up > having to play half w... > > > _______________________________________________ > > Sweng-Gamedev mailing list > > Sweng-Gamedev@lists... > _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com