<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://tcl.activestate.com/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Mon Nov 23 17:00:14 GMT 2009 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='50'>
<header><title>Bundle [incr Tcl] with the Core Tcl distribution</title><author address="mailto:kennykb@acm.org">Kevin Kenny</author><author address="mailto:markh@asiainfo.com">Mark Harrison</author><author address="mailto:jeffh@ActiveState.com">Jeff Hobbs</author><author address="mailto:andreas@ActiveState.com">Andreas Kupries</author><author address="mailto:karl@procplace.com">Karl Lehenbauer</author><author address="mailto:mmc@cadence.com">Michael McLennan</author><author address="mailto:dgp@users.sourceforge.net">Don Porter</author><author address="mailto:welch@acm.org">Brent Welch</author><status type='informative' state='final' vote='after'>$Revision: 1.12 $</status><history></history><created day='27' month='jul' year='2001' /></header>
<abstract>A &quot;town meeting&quot; discussion in which users were given the opportunity to question the Tcl Core Team at the 2001 Open Source Convention has revealed a great popular demand for bundling an object system with the distribution of the Tcl Core. This TIP presents a compromise proposal for including [incr Tcl] that was acceptable to all eight TCT members present.</abstract>
<body><section title="Proposal">
<itemize><item.i><para>[incr Tcl] [<url ref="http://tcltk.com/itcl/"/>] shall be bundled with the core Tcl distribution.</para></item.i><item.i><para>[incr Tcl] shall be &quot;included&quot; in the Core in only a weak sense.</para><para>The location of the [incr Tcl] source tree shall be left to the discretion of the affected maintainers. (It appears likely that most [incr Tcl] source will appear in a separate <emph style="italic">itcl</emph> directory parallel to the <emph style="italic">generic</emph>, <emph style="italic">mac</emph>, <emph style="italic">unix</emph> and <emph style="italic">win</emph> directories in the source.)</para><para>[incr Tcl] shall be built as a separate loadable package, similar to the <emph style="italic">dde</emph>, <emph style="italic">http</emph>, <emph style="italic">msgcat</emph>, and <emph style="italic">registry</emph> packages. </para><para>The <emph style="italic">::itcl</emph> namespace shall be the only new component included in the global namespace, and shall appear only when a script executes</para><verbatim><vline encoding='base64'>ICAgICAgICAgICAgICAgcGFja2FnZSByZXF1aXJlIEl0Y2w=</vline></verbatim><para>There shall be no <emph style="italic">::class</emph> command in the Core.</para><para>The <emph style="italic">::info</emph> command shall not provide any subcommands specific to [incr Tcl].</para></item.i><item.i><para>[incr Tcl] shall not be substantially modified under the scope of this TIP.</para><para>The existing issues surrounding errors thrown from object destructors shall not be addressed.</para><para>The existing use of <emph style="italic">rename</emph> for object destruction shall not be amended.</para><para>All other limitations of [incr Tcl] are initially accepted as they are.</para><para>Of course, additional TIPs could be submitted to modify [incr Tcl] as desired!</para></item.i><item.i><para>The TCT shall assume the role of <emph style="italic">gatekeeper</emph> for changes to the functionality of [incr Tcl].</para><para>Changes that affect user-visible functionality of [incr Tcl] shall be made through the TIP process.</para><para>Informational TIPs identifying maintainer areas and assigning maintainers to them shall be developed.</para></item.i><item.i><para>Nothing in this TIP shall be construed as identifying [incr Tcl] as a single preferred object system for Tcl. If the community desires other systems such as OTcl, XOTcl, or ObjecTcl to stand on an equal footing to [incr Tcl], their champions can introduce TIPs similar to this one.</para></item.i><item.i><para>[incr Tk] and [incr widgets] are outside the scope of this TIP.</para></item.i></itemize>
</section>
<section title="Rationale">
<para>The lack of a standard object and data abstraction system continues to hinder Tcl development.</para>
<quote>&quot;Lets face it, not including any sort of OO system is one of the major failings of Tcl. Indexing into global arrays is a sad hack when compared to a real OO system.&quot; <emph style="italic">- Mo DeJong &lt;<url ref="mailto:mdejong@cygnus.com"/>&gt;</emph></quote>
<para>Moreover, the argument that &quot;Tcl is not object oriented&quot; continues to hamper Tcl marketing. Including at least one object system with the Tcl core, so that it is dependably available unless the user has built from source, would address this objection.</para>
<para>Since an earler proposal (<tipref type="text" tip="6"/>) to incorporate [incr Tcl] into the Core failed to garner the necessary votes, at least in part because participants were uncertain of the rationales, it seems wise to discuss the individual points in further detail.</para>
<itemize><item.i><para>All agree that some sort of object system must be bundled with the core so that it is dependably available. [incr Tcl] appears to be the most popular of the existing systems, as well as the most familiar to the current TCT, making it the most attractive of several candidates for this role.</para></item.i><item.i><para>The original [incr Tcl] developers have pointed out that bundling in the Core would facilitate [incr Tcl] development greatly. While it is a separate loadable package, [incr Tcl] is intimate with the core, depending on many undocumented interfaces to carry out its functions. Integrating it with the Core would make it easier to maintain.</para></item.i><item.i><para>Including a <emph style="italic">::class</emph> command in the Core is not acceptable at this time, because it would have the effect of disenfranchising the users of other object systems -- who are too numerous to ignore. Moreover, the ability of Tcl to serve as a test platform for novel object models must not be compromised.</para></item.i><item.i><para>Similarly, integrating [incr Tcl] closely with commands such as <emph style="italic">::info</emph> or <emph style="italic">::destroy</emph> would accord it a privileged status that the users of other object systems are reluctant to accept.</para></item.i><item.i><para>[incr Tcl] is what it is. It would be inappropriate to demand that all the perceived shortcomings of the [incr Tcl] system be addressed prior to inclusion in the Core. The TIP process is available to make further changes; the system is certainly good enough that many thousands of programmers use it daily.</para></item.i><item.i><para>If [incr Tcl] is to be included in the Core, then common sense requires that it be under control of the TIP process.</para></item.i></itemize>
</section>
<section title="Alternatives">
<itemize><item.i><para>Include [incr Tcl] in a &quot;batteries included&quot; (BI) distribution.</para><para>Many people will not opt for the BI distribution (<tipref type="text" tip="4"/>) due to its larger size. It is quite likely that (for example) a Linux distribution my include Tcl as a standard component, but place the BI on a supplemental disk.</para><para>Moreover, as mentioned above, the [incr Tcl] sources are already intimate with the Tcl core; there are great maintenance savings to be achieved by combining the source distributions. </para></item.i><item.i><para>Integrate [incr Tcl] tightly into the Tcl Core.</para><para>This alternative is unacceptable to a good many users. A number of attendees at the 2001 Open Source Convention mentioned specifically that they use alternative object systems such as OTcl. These users would be essentially disenfranchised if, for instance, a <emph style="italic">::class</emph> command were to appear in the Core.</para></item.i></itemize>
</section>
<section title="Implementation">
<para>Jeff Hobbs has volunteered to lead the implementation effort with the assistance of all volunteers who want to help.</para>
</section>
<section title="Notes">
<para>Eight members of the Tcl Core Team (Harrison, Hobbs, Kenny, Kupries, Lehenbauer, McLennan, Porter and Welch) agreed orally to this proposal at the 2001 Open Source Convention. Since not all have had the opportunity to read the formal written version of the proposal, that vote shall not be considered binding.</para>
</section>
<section title="References">
<itemize><item.i><para><url ref="http://tcltk.com//itcl"/></para></item.i><item.i><para><tipref type="text" tip="6"/></para></item.i></itemize>
</section>
<section title="Copyright">
<para>This document has been placed in the public domain.</para>
</section>
</body></TIP>
