In addition, debugging a script can be hell. Languages such as C/C++ have
matured over many years and your typical development environment
comes with a powerful suite of debugging utilities. You can step through
code a line at a time, break into the code at will, and create watches to track
the peskier of your variables. Programmers have never had it so easy. How
ever, when you start to use scripting languages, the simplest of bugs can
take an age to track down. Even a plain old syntactical error can seem like
a bug from hell.
Of course, the level of evil inherent in scripting languages varies tre
mendously. Some languages provide no assistance whatsoever, while
others (Lua for example) provide a few error codes, may throw exceptions,
and can halt the script before too much damage is done. Very few, however,
provide the sort of facilities you are used to, so most of the time you will
end up writing your own.
Scripting is such an enormous topic that it is impossible to teach everything
about it in just one chapter. However, by now you should know enough to
be able to create reasonably complex scripts using the Lua scripting lan-
guage and integrate them seamlessly in your own games and applications.
If this chapter has got you excited about the possibilities provided by Lua
and Luabind, then I strongly recommend you put a day or two aside and
read the documentation from cover to cover. It’s also a good idea to visit
some of the URLs I’ve mentioned and browse through the mailing list
archives. You’ll find all sorts of unusual and interesting ways of using the
To Script, or Not to Script, That Is the Question | 293