Friday, December 28, 2007

DOM, take two

Last night at Too Damn Late[TM], I got some really good ideas which amount to a refactoring of the DOM.

  • The accessors should be smart get/set types
  • VERBATIM chunks should be containers in the manner of TRIGGERS rather than special cases of TEXT chunks
  • I was misusing the 0E0 value; it should be replaced with 'undef'
  • Now that both the DOM tree and the text stowage structure are arrays instead of hashes, their additive methods can be rewritten with simple push()es instead of index accesses
  • ...and the associated node tracking scalars can be gotten rid of
And then a lot of little things auxilliary to these points. And rewrites of the POD to match it all. And a likely painful overhaul of the test suite.

Oh well. That's progress. The Grammarian and its Handlers follow this.

No comments: