Lecture 24
8
Dispatch table vs if-else if-else if
•To add new commands just add a table entry
•Command semantics separate from syntax
•Lots of design overhead, hard to understand
•Good for large command sets that will grow    (Juno shell commands)
•To add new commands must edit the main loop
•Command semantics and syntax in same place
•Quick and dirty, easy to understand and code
•Good for small command sets that stay put      (Juno login loop)
Lecture 18