Elliotte Harold wrote:
Peter B. West wrote:

But of course, I'm talking about Folio, which was built on a pull-parsing model before I had ever heard of pull-parsing, because it was the screamingly obvious thing to do. It gives me acute pleasure to see my original design decisions vindicated by the the development of the StAX API, and the current surge of interest. So, all of this, and more, _is_ the case. My invitation stands.

I haven't looked at Folio yet. Perhaps it's screamingly obvious that it needs a pull model. If so it's the first such application I've encountered. The really useful pull models are implemented on top of tree structures, and provide random access. I've yet to see a case where a one-way streaming pull parser did anything that couldn't be accomplished equally easily and efficiently with a push parser.

The primary benefit to pull parsers is that some developers either don't understand or simply don't like the observer design pattern as embodied in push parsers, and prefer the iterator design pattern as embodied in pull parsers. Whatever floats your boat. However there's no evidence that either pattern is in any way fundamentally superior to the other, except as a matter of developer taste.

As a practical matter, existing SAX parsers are much better optimized and debugged than existing StAX parsers. They're simply a more mature product.


We're seriously OT here, so I'll off-line my response.


Peter B. West <http://cv.pbw.id.au/>
Folio <http://defoe.sourceforge.net/folio/>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to