[TCLCORE] TIP #151: Remove -e: Command Line Option from tclsh and wish
by Don Porter other posts by this author
Aug 25 2003 2:20PM messages near this date
[TCLCORE] Re: TIP #139 and BLT
|
[TCLCORE] TIPs 147, 148, 151: Last call for comments
TIP #151: REMOVE -E: COMMAND LINE OPTION FROM TCLSH AND WISH
==============================================================
Version: $Revision: 1.4 $
Author: Don Porter <dgp_at_users.sourceforge.net>
Don Porter <dgp_at_users.sf.net>
Donal K. Fellows <donal.k.fellows_at_man.ac.uk>
State: Draft
Type: Project
Tcl-Version: 8.5
Vote: Pending
Created: Friday, 22 August 2003
URL: http://purl.org/tcl/tip/151.html
WebEdit: http://purl.org/tcl/tip/edit/151
Post-History:
-------------------------------------------------------------------------
ABSTRACT
==========
This TIP proposes removal of the -e: command line option to tclsh and
wish that was Accepted as part of [TIP #137].
BACKGROUND
============
[TIP #137] was Accepted today. However, there were a few NO votes
objecting to the new _-e:_ form of the _-encoding_ command line option
for specifying the encoding of a startup script to tclsh and wish.
Those voting NO only objected to that part of [TIP #137] while
supporting the rest as a solid proposal that will improve Tcl. Among
those voting YES, no one explicitly embraced the _-e:_ command line
option as something they required. Some voting YES opined that the
_-e:_ option was a wart that could be fixed later.
Based on those comments, [TIP #137] would have been better had the
_-e:_ form of the command line option not been part of the proposal.
This TIP proposes nothing more than removing Acceptance of the _-e:_
form of the _-encoding_ command line option.
Without the controversial _-e:_ proposal, I believe [TIP #137] would
have had unanimous approval.
RATIONALE
===========
The use of _-e:_ as a command line option to tclsh or wish suffers when
compared with the perl program. The _perl -e_ option for evaluation of
a Perl script provided on the command line is very well known, and it's
a mistake to add something to tclsh that looks similar, but is in fact
very different.
[TIP #137] proposed both _-encoding_ and the _-e:_ form. There's really
no need to add multiple ways to do the same thing.
The Rationale in [TIP #137] for the _-e:_ form is solely to support the
32-character limit in some Unices for their _#!_ lines. However, the
_-e:_ form does not really solve that problem. For example:
#!/usr/local/bin/tclsh8.5 -e:iso8859-15
12345678901234567890123456789012
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:
#!/usr/bin/tclsh8.5 -e:iso8859-15
12345678901234567890123456789012
(This is actually an insidious failure mode in that it leads to the
script being sourced with a valid but incorrect encoding.)
Conversely, we already have an effective general workaround for the
32-character limit problem:
#!/bin/sh
# exec tclsh -encoding iso8859-15 "$0" ${1+"$@"}
So, _-e:_ doesn't solve a problem we don't really have, and it's
controverisal. We should remove it.
PROPOSAL
==========
Remove (Acceptance of) the _-e:_ set of command line options to the
programs _tclsh_ and _wish_.
COMPATIBILITY
===============
Since no version of Tcl or Tk has been released supporting the _-e:_
command line option, there are no compatibility issues to resolve.
COPYRIGHT
===========
This document is placed in the public domain.
-------------------------------------------------------------------------
TIP AutoGenerator - written by Donal K. Fellows
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
|