From: Brian G. <bri...@me...> - 2012-09-09 19:27:33
|
On Sep 9, 2012, at 10:22 AM, Donal K. Fellows wrote: > On 09/09/2012 17:24, Edgaras Šeputis wrote: >> I'm quite new to tcl, but I quite like it seems really fun language to >> work with. > ... >> I understand that most likely newcomers opinion is not a big >> concern, but then I would at least like to know why it was decided >> to load (though it seems to from 'strace' that it's compiled into >> libtcl8.6.so) by default, since making it optional seems to be more >> obvious decision. > > It's there by default because it's entangled very deeply in a few > places. That lets it be quite a bit faster than it would otherwise be, > and at less maintenance-effort cost. It also lets us tackle things that > the community has been asking for for many years (e.g., TDBC). > > "Never add a feature unless everyone wants it" is a recipe for complete > stasis. Instead, we ask "does the benefit outweigh the costs" and > frankly, the cost of 150kB of extra code is pretty tiny. (We've long > past the 64kB and 1MB overall targets, even without TclOO, so the > *really* micro embedding community isn't very interested anyway.) > > Donal. (Note, I wrote TclOO; I'm going to defend the decision to include > it very strongly indeed. Just so you know… :-)) Hi Edgaras, and welcome! I would like to add some to what Donal has said. I was one of a group of Tcl "users" that strongly encouraged the inclusion of OO in Tcl, and here are my reasons: OO is a design pattern just like any other used in software. It is a valuable tool to have in your toolbox, but you don't have to use it (unlike java where you can't not use it.) There are a large number of useful packages already written for Tcl that solve common problems. Using an already written package instead of writing solutions directly is another common software design pattern called reuse. In the past, various implementors have chosen to use OO to write their extensions, as Donal has pointed out, and this fact should be transparent to any consumer of the package. Without OO built into the core language, what we ended up with in the broader Tcl community was m different packages using n different OO extensions. As an application developer using Tcl, this becomes an unmanageable menagerie of dependencies. Heavy weight vs light weight: Tcl is used in a large and varied number of applications. Catering to one side only would be to the detriment of the language in the long term, especially considering the continuing growth and capabilities of hardware. To address some of the heaviness of Tcl, there are configuration options available to lighten the size of Tcl (however, I don't believe OO is part of this.) And for the byte counting extremist there is Jim Tcl (http://jim.tcl.tk/). I hope this helps answers your question about the history and justification of this decision. -Brian |