[jdom-interest] Still more Verification

Tako Schotanus tako at backstream.com
Wed Aug 23 05:48:40 PDT 2000


And in what way would it be made "difficult"?
Because I sure as hell wouldn't like it if I would be forced to use slower code just because to force correctness on lazy programmers.
And the fastest code should be just as easy to use in my opinion.

> At 9:43 AM +0200 8/23/00, Oliver Imbusch wrote:
> >>>>>> "jh" == Jason Hunter <jhunter at collab.net> writes:
> >
> >Hi,
> 
> >    jh> But how would one differentiate between the two?
> >
> >public void setValue (String value, boolean check) {
> >    if (check) {
> >        String reason = Verifier.checkCharacterData (value);
> >        if (reason != null) {
> >            throw new IllegalDataException (value, reason);
> >        }
> >    }
> >    this.value = value;
> >}
> >
> 
> I really don't like this option. It lets programmers who don't 
> understand what they're doing sacrifice program correctness in the 
> name of the false god performance. In my experience, programmers are 
> way too quick to make pointless optimizations and way too slow to 
> make sure their code actually does what it's supposed to do. We 
> should make it as hard as possible to do the wrong thing and as easy 
> as possible to do the right thing.
> 
> May I ask why you turned off the verification code? What was the 
> program? What performance measurements showed you that this was the 
> bottleneck in your code? How much speed did you gain by disabling the 
> verification?
> 
> +-----------------------+------------------------+-------------------+
> | Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
> +-----------------------+------------------------+-------------------+
> |                  The XML Bible (IDG Books, 1999)                   |
> |              http://metalab.unc.edu/xml/books/bible/               |
> |   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
> +----------------------------------+---------------------------------+
> |  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
> |  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
> +----------------------------------+---------------------------------+
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yourad
dr at yourhost.com



More information about the jdom-interest mailing list