Re: [gdome]A(bstract) DOM



Hi there.

> You cannot instantiate abstract classes. No accident possible here.

of course. I'd like to see it even for implementation classes and anyway
it's a good form of documentation for your program.

> Just for being DOM compliant, or do you actually see any use in it? I
> thought of this, too, but I don't believe anyone would use the UTF16
> interface.

I can understand the choice of UTF8 for libxml which does not aim to be a
DOM implementation (even though people from non-Western countries might
have something to object). And anyway, it's a bit embarrassing to talk at
a XML conference starting with: "well, this was supposed to be a DOM
implementation, however strings are not encoded in UTF16..." :-)
Whether or not it's gonna be popular among Gnome users, I'd like to
have a real DOM implementation.

> So you want generic C++ language bindings for the DOM, similar to the Java
> and ECMAScript language bindings by the W3C DOM WG. Tricky. You would have
> to decide for how memory is managed in an abstract API. You wrote that you
> want ref/unref methods for that.

If C++ was the perfect language we would have the perfect API... ;)

> Users of a C++ API should IMHO either not bother with memory management at
> all ( -> smart pointers ), or have total control over the objects they
> create ( -> may delete them )

Well, I understand you are a user in the first category, but splitting up
things is also a good modularization principle (and what about overloading
delete so that it calls unref?)

> With gdome2 in particular, you would introduce a reference counted C++
> layer around a reference counted C layer around libxml.

I'm not worried about this. As long as the interface I use is clean
enough I don't care what's behind it. And anyway, gdome can evolve some
day or someone can provide another implementation *for the same abstract
classes* which is purely C++ based.

> Indeed. But then C++ is only one small step in the right direction.
> Sometimes you can't go further because of performance. But if you want to
> use a really beautiful language, you have to make two steps and switch to
> Ruby :-).

don't wanna start a flame on this, the first line of the "What's Ruby"
page is enough for me to say it's not what I'm looking for

	"Ruby is the interpreted scripting language"...

:-ppPPpPPPpPpPPp

> BTW, have you tried to work on an Ocaml wrapper?

we'll do that as soon as the ref counting mechanism for Gdome2 will be
stable enough (we've been tied up with other stuff in the meantime)

thanks for the reference to your old binding code, I'll look at that.

bye bye

	luca





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]