On 15/05/2013 03:18, nagu wrote:
> Coming from C/C++ background, I found incrTcl a very natural move to
> pickup Tcl. I haven't learned TclOO yet. But, I thought it was meant
> for other OO frameworks (like itcl, snit etc) to be written onto than
> for direct usage (though there is nothing that stops you).... But,
> this subject, we can take it in a separate thread I guess :-)
One of the curious things about OO foundations is that they're also OO
systems in their own right (or at least it's very easy to make them be
that way). However, incrTcl 4 is indeed built on TclOO, and is also
properly part of any complete Tcl 8.6 distribution, so building on top
of that is just fine. (IIRC, itcl and TclOO are the strongest OO systems
on the C API front, but I might be flat wrong there.)
Adapting to use TDBC (esp. tdbc::sqlite) instead of SQLite shouldn't be
too hard. Adapting to other DBs... well, the real problem is that the
SQL dialects themselves vary quite a bit and TDBC doesn't do anything to
help with that (because it inhibits supporting other uses, alas;
supporting power-users was judged to be more critical than easing
trivial migrations). The TDBC system tries to make at least the Tcl side
of things be best-practice stuff though, so that the only problems are
in how to connect (not too hard, really) and how to write the SQL.
Donal.
--
Donal Fellows — Tcl user, Tcl maintainer, TIP editor.