| Store | Cart

Re: [TCLCORE] TIP 485: Remove Deprecated API

From: Brian Griffin <bria...@easystreet.net>
Wed, 8 Nov 2017 17:54:53 +0000
As a random data point, scanning our code base (the one I work with, not the entirety of Mentor Graphics):

not used Tcl_Backslash
not used Tcl_EvalTokens
used     Tcl_EvalFile
not used Tcl_FSEvalFile
not used Tcl_GetDefaultEncodingDir
not used Tcl_SetDefaultEncodingDir

-Brian

On Nov 8, 2017, at 9:12 AM, Donald G Porter <dona...@nist.gov<mailto:dona...@nist.gov>> wrote:


Thanks to Jan Nijtmans for keeping up the Tcl 9 momentum with a TIP
on removing some deprecated routines.

I added to the rationale for killing both Tcl_Backslash() and
Tcl_EvalTokens().  These routines are crippled in their capabilities
and can now only be used to write broken programs.  Ending their
existence is justified because it improves any code they are still
in to force movement to their long-existing and more capable successors.

I do not see the same compelling case to remove Tcl_EvalFile().
This is a routine to call when the caller has a filename in the
format of a (const char *).  I don't see the value in removing this
interface and forcing onto that caller the boxing/unboxing work
needed to call Tcl_FSEvalFile() instead.  This doesn't produce
better extension code, only bulkier extension code -- and arguably
more opportunity for refcounting errors.

Similarly, Tcl_Get|SetDefaultEncodingDir() are routines to use when
you have or need a directory name as a string value.  They do no harm.
My inclination is to keep them.

I need to think about the legacy interfaces for defining math
functions.  I truly hate them, but I'd rather have a better
reason than distaste to break existing code and force a
gratuitous incompatibility that doesn't also add some value to
the coders who are imposed on.

--
| Don Porter            Applied and Computational Mathematics Division |
| dona...@nist.gov<mailto:dona...@nist.gov>             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org<http://Slashdot.org>! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net<mailto:Tcl-...@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/tcl-core


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Donald G Porter Nov 08, 2017 05:12 pm
Brian Griffin Nov 08, 2017 05:54 pm
Donald G Porter Nov 09, 2017 08:05 pm
Donald G Porter Nov 09, 2017 08:11 pm
Messages in this thread