On Wed, Jan 26, 2005 at 03:33:34PM -0600, Conor Davis wrote: > Paul Pelzl wrote: > > >[...] > > > >So, at this point, I guess I'd be inclined to continue working off my > >server code. But if you have any compelling arguments in favor of > >switching to your server, I'd like to hear them. > > > > > > > > Fine by me. There are some bits from my server that I think are worth > keeping: > > * Optional tags Yes. That would simplify debugging. > * Using the client state + command name to find the correct method > to call for a given command Can you elaborate on that? My server has one method per command... are you just suggesting that those methods should be broken up into smaller functions? > * Raising exceptions to indicate command failure or bad commands Agreed. > >I think a rigid command syntax will be adequate for our needs. Rather > >than accepting optional arguments, we can just use different commands > >for different numbers of args. For example, I am using command "join" > >to enter a new game room (no password required), and "rejoin" to enter > >an old in-progress game (password required). Similarly, command "move" > >vs. "doublemove". The number of options is pretty limited, so I think > >using multiple commands is a good solution. > > > > What if a variant wants to allow for, say, a triple move? Well, frankly, I can't imagine allowing a triple move. That could easily carry someone halfway across the map! But, hypothetically speaking, it wouldn't be a big deal to have N different move commands for, say, N <= 4. And aside from that issue, I am having a hard time thinking of commands which need to have more flexibility. > My server is rigid because the command dispatch framework is responsible > for validating the number and content of the arguments. If, instead, the > actual command routine validates the arguments, then we can be more > flexible. In my server, the command routines validate the arguments. So it would be possible to be more flexible, if necessary. Paul ============================================================== The London Law Users mailing list londonlaw-users@xxxxxxxxxxxxx List info: //www.freelists.org/list/londonlaw-users ==============================================================