<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://www.tcl.tk/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Fri May 24 06:46:26 GMT 2013 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='151'>
<header><title>Remove -e: Command Line Option from tclsh and wish</title><author address="mailto:dgp@users.sourceforge.net">Don Porter</author><author address="mailto:dgp@users.sf.net">Don Porter</author><author address="mailto:donal.k.fellows@man.ac.uk">Donal K. Fellows</author><status type='project' state='final' tclversion="8.5" vote='after'>$Revision: 1.7 $</status><history></history><created day='22' month='aug' year='2003' /></header>
<abstract>This TIP proposes removal of the -e: command line option to tclsh and wish that was Accepted as part of <tipref type="text" tip="137"/>.</abstract>
<body><section title="Background">
<para><tipref type="text" tip="137"/> was Accepted today. However, there were a few NO votes objecting to the new <emph style="italic">-e:</emph> form of the <emph style="italic">-encoding</emph> command line option for specifying the encoding of a startup script to tclsh and wish. Those voting NO only objected to that part of <tipref type="text" tip="137"/> while supporting the rest as a solid proposal that will improve Tcl. Among those voting YES, no one explicitly embraced the <emph style="italic">-e:</emph> command line option as something they required. Some voting YES opined that the <emph style="italic">-e:</emph> option was a wart that could be fixed later.</para>
<para>Based on those comments, <tipref type="text" tip="137"/> would have been better had the <emph style="italic">-e:</emph> form of the command line option not been part of the proposal. This TIP proposes nothing more than removing Acceptance of the <emph style="italic">-e:</emph> form of the <emph style="italic">-encoding</emph> command line option.</para>
<para>Without the controversial <emph style="italic">-e:</emph> proposal, I believe <tipref type="text" tip="137"/> would have had unanimous approval.</para>
</section>
<section title="Rationale">
<para>The use of <emph style="italic">-e:</emph> as a command line option to tclsh or wish suffers when compared with the perl program. The <emph style="italic">perl -e</emph> option for evaluation of a Perl script provided on the command line is very well known, and it&apos;s a mistake to add something to tclsh that looks similar, but is in fact very different.</para>
<para><tipref type="text" tip="137"/> proposed both <emph style="italic">-encoding</emph> and the <emph style="italic">-e:</emph> form. There&apos;s really no need to add multiple ways to do the same thing.</para>
<para>The Rationale in <tipref type="text" tip="137"/> for the <emph style="italic">-e:</emph> form is solely to support the 32-character limit in some Unices for their <emph style="italic">#!</emph> lines. However, the <emph style="italic">-e:</emph> form does not really solve that problem. For example:</para>
<verbatim><vline encoding='base64'>ICMhL3Vzci9sb2NhbC9iaW4vdGNsc2g4LjUgLWU6aXNvODg1OS0xNSA=</vline><vline encoding='base64'>IDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEy</vline></verbatim>
<para>Here we see that we still run afoul of the 32-character limit when tclsh is installed in the default location. Even longer encoding names exist which magnify the problem, and altering the installation location will not necessarily help:</para>
<verbatim><vline encoding='base64'>ICMhL3Vzci9iaW4vdGNsc2g4LjUgLWU6aXNvODg1OS0xNSA=</vline><vline encoding='base64'>IDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEy</vline></verbatim>
<para>(This is actually an insidious failure mode in that it leads to the script being sourced with a valid but incorrect encoding.)</para>
<para>Conversely, we already have an effective general workaround for the 32-character limit problem:</para>
<verbatim><vline encoding='base64'>ICMhL2Jpbi9zaA==</vline><vline encoding='base64'>ICMgXA==</vline><vline encoding='base64'>IGV4ZWMgdGNsc2ggLWVuY29kaW5nIGlzbzg4NTktMTUgIiQwIiAkezErIiRAIn0=</vline></verbatim>
<para>So, <emph style="italic">-e:</emph> doesn&apos;t solve a problem we don&apos;t really have, and it&apos;s controverisal. We should remove it.</para>
</section>
<section title="Proposal">
<para>Remove (Acceptance of) the <emph style="italic">-e:</emph> set of command line options to the programs <emph style="italic">tclsh</emph> and <emph style="italic">wish</emph>.</para>
</section>
<section title="Compatibility">
<para>Since no version of Tcl or Tk has been released supporting the <emph style="italic">-e:</emph> command line option, there are no compatibility issues to resolve.</para>
</section>
<section title="Copyright">
<para>This document is placed in the public domain.</para>
</section>
</body></TIP>
