[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Language politics and DOM bindings
- From: Uche Ogbuji <uche.ogbuji@fourthought.com>
- To: Lauren Wood <lauren@sqwest.bc.ca>
- Date: Mon, 15 Jan 2001 00:19:05 -0700 (MST)
> Uche Ogbuji wrote:
>
> > > I can't say authoritatively, but I believe that the
> > > DOM WG members would see an official Python binding as a "good thing" ... as
> > > long as someone was willing to do the work required. I think the mechanism
> > > defined by the W3C Process to do this kind of thing is to make a
> > > "Submission". See
> > >
> > http://www.w3.org/Consortium/Process/Process-19991111/submission.html#Submission
> >
> > Thanks for the ref, but as you suggest, it seems to allow only submissions
> > by W3C members. I don't know if the XML SIG has anyone working for such
> > an organization.
>
> It's quite possible that someone either works for such an organization,
> or knows someone
> who works for such an organization; there's a list of the member
> organizations at
> http://www.w3.org/Consortium/Member/List
A possibility worth checking out.
> > > The DOM WG actually considered committing itself to do a C++ binding, and to
> > > the best of my recollection the memory management issue was the largest nail
> > > in that idea's coffin. I'm not completely sure, and don't care to
> > > second-guess exactly why that decision was made ... in retrospect, you may
> > > well be right that memory management shouldn't have been a consideration.
> >
> > I'm willing to bet it was DOM WG laziness. In C++, memory management is a
> > matter of adhering to Bjarne Stroustroup's simple and effective rule that
> > "resource aqcuisition is initialization".
>
> My memory is that it wasn't solely a memory management issue; it was
> more that nobody volunteered to do all the work of figuring out a C+
> binding that would take into account things including memory management,
> and the fact that COM and non-COM systems have different requirements.
> Since I was chair of the DOM WG at the time, I can tell you that it
> wasn't that we were being lazy.
The language was too strong on my part. I was mostly just annoyed at the
off-hand dismissal of C++. Doubly annoyed when my request for technical
details was met with an "I can't be bothered". I get tired of hearing the
frankly silly reasons people tend to give for dismissing C++. "No
automatic memory management". "Pointers are unmanageable". etc. I have
personally come to dislike C++, but my reasons are certainly not so simple.
In fact, if I could practically use the original C++ of the Annotated
Reference manual rather than ISO C++, it would probably still be my
favorite language.
But the main point is that I certainly don't blame the DOM WG for not
having anyone available to do the work. This is a far more acceptable
reason than "memory management issues".
> With hindsight, maybe we should have
> taken an extra 2-4 months to figure out the C++ bindings for Level 1; at
> the time we were being yelled at for taking too long any way and any
> extra time for another binding would have been hard to justify without
> *somebody* standing up and saying it was necessary. I can't remember
> anyone at the time (late 1998) saying that a C++ or Python binding was
> necessary for Level 1.
I certainly don't expect that the WG put out a Python binding with the
same priority as Java, ECMA and C++. As it is, we were happy to do so
ourselves in the Python XML SIG. I brought the matter
up to test the idea that bindings other than Java and ECMA are welcomed by
the WG, and have an opportunity to be granted official standing. You and
Michael have been rather helpful in your responses and hopefully something
can come of it.
> Now, of course, doing a C++ binding would be
> extremely difficult, since there are lots of DOM implementations that
> use C++ that look different to each other. Even if the DOM WG were now
> to develop a C++ binding, I wouldn't keep my hopes up that many people
> would implement it.
Hmm. this divergence in C++ implementations is certainly unfortunate.
> > > So, it's not a matter of the "W3C" agreeing or disagreeing with any of this,
> > > it's mainly a matter of whether any members commit the resources to help
> > > make it happen. As near as I can tell, that's how the W3C "draws the line"
> > > between what gets done and what doesn't.
> >
> > I disagree. I would likely volunteer to write a Python binding (Fred
> > Drake, Paul Prescod and I, among others have already done a good deal of
> > the work), but we're not W3C members.
>
> Then I suggest you email the chair of the DOM WG (Phillipe Le Hégaret,
> W3C) and ask that he discuss the issue with the DOM WG, pointing out
> that you will do the work. You might like to also point out whether this
> offer of doing Python bindings extends to all modules in Levels 2 and 3
> as well as Level 1. I'm no longer on the DOM WG, so I don't know how
> this suggestion would be taken.
>
> Also, I don't know enough about the Python bindings to know whether the
> same problem shows up there as in Perl. The problem with defining a
> single Perl binding is that the XML::DOM module uses a Java-style
> binding (e.g., getFirstChild), while those implementations which use the
> Microsoft Automation system tend to use an ECMA Script-style binding
> (e.g., firstChild). Is there a similar issue in Python?
We hashed out this issue at great length on the SIG mailing list and in
the end, the ECMA style prevailed (It's far more Pythonic). As far as I
know all the Python DOM implementations: minidom, 4DOM, pulldom,
cDomlette, pDomlette, DbDOM, StructuredTextNG and ZDOM are all reasonably
uniform.
> If the entire Python community uses a single binding, then it won't be
> as much of a problem as if there are differences. If there are
> differences, the biggest amount of work would be to get the Python
> community using the bindings to figure out what they want.
Yes. But I think this much is behind us. I do think it would be useful
to have a Python DOM binding of official standing. I've successfully used
the existence of an official Python/CORBA binding as powerful ammo
in getting a potential client to accept Python as an implementation
language (often to the delight of the rank and file developers at the
company). For companies that take their W3C XML standards seriously, a
Python/DOM binding could be another argument.
--
Uche Ogbuji Principal Consultant
uche.ogbuji@fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python