[jdom-interest] Why not interfaces?

Jason Hunter jhunter at collab.net
Thu Sep 7 14:29:10 PDT 2000

> I missed the original. Is there somewhere I can review it online? I
> don't want to rehash a discussion that has already been had.

The archives are online via the link from the web site.  Not easy to
search except download a month and CTRL-F but it gets the job done.

> 1) Making the Document thread-safe.
> - Looking over the latest code, Document is not thread-safe. I would
> recommend a solution similar to the one offered by the Java 1.1
> collections. Have a "standard" implementation that is *not*
> thread-safe, and a method on the Document builder that is
> "buildSynchronized", that wraps a synchronized wrapper around the
> document.

The FAQ addresses this.  We leave it to the programmer because we can't
do much thread safety within the class, most has to be external, so we
let all be external.

> 2) Mandating how equals is handled.
> - One suggestion is to have a static utility method to compare to two
> Documents. The "standard" implementation would use this. Novel
> implementations of the Document (if it was an interface) could also
> use it.
> I'm sure that you covered this, and other issues in your recent post.
> I'd really like to read it before I step in it too deeply.

I didn't write all *that much* about it because I know interfaces aren't
something we're willing to switch (back) to.  We actuall started with
interfaces in our private impls before going public, and believe me we
were MUCH happier about the design with concrete classes.


More information about the jdom-interest mailing list