[dev] Re: [cvs] commit: imp mailbox.php imp/lib Mailbox.php Message.php

Michael M Slusarz slusarz at bigworm.colorado.edu
Tue Jun 17 11:58:32 PDT 2003


Quoting Jan Schneider <jan at horde.org>:

| Zitat von Jon Parise <jon at horde.org>:
|
| > On Mon, Jun 16, 2003 at 09:24:21PM -0400, Chuck Hagenbuch wrote:
| >
| > > Sure. I was just making the point that it can be a *lot* harder to
| > follow
| > > the code now. Feel free to go with other ways that use fewer
| constants.
| >
| > I like the idea of using string-based action identifiers.  I doubt the
| > string comparisons will be that expensive, and it would help
| > readability quite a bit.  I never much cared for the numbers.
|
| A problem is though, that typos are much harder to find with string
| actions.
| If you have a typo in a constant name, you will notice immediately.
| OTOH are action identifiers only used in prominent places anyway and thus
| typos get spotted much easier than typos in variable names.

Counterpoint: if there is a typo, you will immediately see that what you are
trying to accomplish is not being done, and one of the first checks in
debugging (at least, what I would check first) is that the requested
actionID is even being reached.  So the extra step in debugging doesn't
seem to me to be a strong enough reason to not using the string IDs.

Anwyay, I have converted all the IMP IDs to strings in HEAD, so we can use
that as a test to see if this is a "Good Idea" (TM) to use everywhere.

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the dev mailing list