httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: cvs commit: apache/src conf.h http_config.c http_config.h http_core.c http_core.h
Date Sat, 27 Jul 1996 17:31:48 GMT
  Unfortunately it is also used in set_rlimit. I'm happy to discuss
  it, though.  It seemed like a useful and harmless addition to me,
  and it is back compatible, unlike many other changes that I'd really
  like to make.

It strikes me as creeping featurism.  The problem is that there was
*already* a way to do this, via the cmd_info machinery.  Adding
another, by itself, isn't *so* bad, but once these "harmless
additions" start to pile up, keeping track of the interactions of all
the redundant, but slightly different mechanisms, gets to be really
awkward.  Better not to create the situation in the first place, if
there's an easy way to avoid it --- and in this case there is.

Using the preexisting cmd_info instead of your new thing wouldn't add
a single line of code to your command handlers, or to the command
tables that invoke them; given that, it's going to be awfully hard to
convince me that cmd->cmd makes them easier to write.

  How about TAKE1|TAKE2? Assuming there are considerably less than 32
  possibilities, that is.

This opens a larger can of worms than it appears to --- that idea
looks fine in this particular case, but combinations like FLAG|TAKE1
("On, Off, or maybe something else"?), FLAG|TAKE2 ("A flag and an
optional argument?  On, Off, or maybe something else, and an optional
argument"?) or even worse, something like RAW_ARGS|ITERATE, are a lot
harder to interpret.  Best to leave the command table entry indicating
a *single* grammar for the arguments --- TAKE1 vs. TAKE2 is really
just about the only case where the command parser can distinguish the
alternatives without additional information.

BTW, I notice this is going on on apache-cvs.  I thought the reply-to
address on CVS update notices was supposed to bounce comments on
them back to the main list?


View raw message