[jdom-interest] detach() [eg]

Brett McLaughlin brett at newInstance.com
Thu Apr 26 07:55:46 PDT 2001

----- Original Message -----
From: "Kenworthy, Edward" <edward.kenworthy at exchange.co.uk>
To: <jdom-interest at jdom.org>
Sent: Thursday, April 26, 2001 9:24 AM
Subject: RE: [jdom-interest] detach() [eg]

> In your humble opinion.
> Randomly messing with api just to get your pet fix is not the ideal
> solution, especially when a better solution that deals not just with this
> issue but all and any methods that could put the document in an invalid
> state is available.

What? I think you need to tone down the rhetoric a bit. Elliotte has been
working on this API since the very beginning, and even when he and I, or he
and Jason, or he and you don't agree, there's no reason for anyone to start
throwing jabs at anyone else. Elliotte has consistently been the voice of
XML and specificiation "correctness" around here; I don't think this is his
pet fix. I also agree with him, so I suppose it's "our" pet fix in that

> Throwing an ISE when the document is in an invalid state is the right
> to do, regardless of the debate over detach(). A document with it's root

I'm not sure that it's possible to say that yet. That doesn't take into
account a solution that doesn't ever allow a Document to get into that
state, which is the crux of Elliotte's solution; maybe you missed that. In
that light, his solution is "more correct" than anything else, and I think
we'd all agree with that. However, the argument stems from the usability of
such a solution.

Sounds like everyone needs to tone it down a little; it's an API folks, not
world hunger ;-)


> removed should also throw an ISE. How does your solution address that ? It
> doesn't. Rather than looking at only the small picture (detach) a good
> solution would address all similar issues in one consistent approach.
> Throwing an ISE does this.
> -----Original Message-----
> From: Elliotte Rusty Harold [mailto:elharo at metalab.unc.edu]
> Sent: 26 April 2001 14:57
> To: jdom-interest at jdom.org
> Subject: RE: [jdom-interest] detach() [eg]
> At 10:10 AM +0100 4/26/01, Kenworthy, Edward wrote:
> >Secondly, changing the behaviour of detach() in the way Elliotte has
> >suggested, whilst ideal if we were starting from scratch, will break
> >existing code and would cause considerable confusion. Modifying the
> Document
> >to throw an ISE maintains all existing code.
> >
> This is a spurious argument. The detach() wasn't even present in beta
> 6. If we take it out between beta 6 and beta 7 I see no problem.
> Personally, I'm of the opinion that the entire API should be up for
> grabs and subject to change with no concerns for backwards
> compatibility until we declare something 1.0. I certainly don't think
> a method that simply got checked into CVS one day is necessarily
> inviolate.
> --
> +-----------------------+------------------------+-------------------+
> | 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:
> t.com
> _______________________________________________
> To control your jdom-interest membership:

More information about the jdom-interest mailing list