Melchior FRANZ wrote:

This and your examples (mouse handling, etc.) have totally won me over! I've already written my first nasal script

I haven't had time to play with NASAL yet, but now that it's integrated and people seem to like it, it's probably time to start refactoring FlightGear a bit. Originally, I defined actions using XML mainly because we didn't have a scripting language, but ideally, we should share up the labour like this:


XML = declarative
NASAL = imperative

i.e. if we want to say "this is X," we use XML; if we want to say "do Y", we use NASAL. A drop-down menu is declarative, but the actions associated with each menu item are imperative, and could be NASAL code snippits. The keymap is declarative, but the actions associated with each keystroke are imperative, and again, could be NASAL code snippits embedded in XML.

If anyone wants to start on some analysis and make a few suggestions, or even rewrite some code, you have my blessing (as if you needed it). XML is a great language for serializing data structures, but it's a lousy syntax for writing code, and I've never liked using it that way.


All the best,



David



_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to