[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xml-dev] What should TrAX look like? (Was: Re: [xml-dev] Articleon JAXP 1.3 "Fast and Easy XML Processing")
- To: Michael Kay <mike@...>
- Subject: Re: [xml-dev] What should TrAX look like? (Was: Re: [xml-dev] Articleon JAXP 1.3 "Fast and Easy XML Processing")
- From: Elliotte Harold <elharo@...>
- Date: Mon, 21 Feb 2005 18:45:16 -0500
- Cc: 'Dare Obasanjo' <dareo@...>, 'Prakash Yamuna' <techpy@...>, xml-dev@...
- In-reply-to: <E1D3MmA-0005vZ-00@...>
- References: <E1D3MmA-0005vZ-00@...>
- User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041217
Michael Kay wrote:
> You know the answer to your question. But it doesn't address my point. You
> claimed that defining the interface to accept Source was no better than
> defining it to accept Object. I pointed out that it was better, because
> defining it as Source would catch many type errors.
I think the Python folks have pretty well convinced me that this doesn't
help nearly as much as I used to think. I find it hard to imagine a case
where I'd pass the wrong object to a transform method, and it would
survive more than the first test run. These sorts of errors are caught
so quickly they really don't need special compiler support to help them.
Marker interfaces have their places. Serializable doesn't bother me, for
instance, because whether an object is serializable or not. An object
that implements it is probably serializable. An object that doesn't
isn't. Yes, I know there are exceptions to this; but that's basically
how it works. Declare an object Serializable and ObjectOutputStream will
try to serialize it. Declare that an object implements Source, and
there's little a transformer can do.
--
Elliotte Rusty Harold elharo@...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
|