Check-in [53c69e3a9d]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:TIP 342 is Final
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 53c69e3a9d28499013825cfb2acb0899e54b3f825c46efdd9701aaf502830204
User & Date: dkf 2019-04-16 13:31:58
Context
2019-04-18
01:54
Tweak example in tip 536 check-in: 8ecc901f75 user: kevin_walzer tags: trunk
2019-04-16
13:31
TIP 342 is Final check-in: 53c69e3a9d user: dkf tags: trunk
2019-04-15
12:22
Editorial tweaking of 538 check-in: 11e42c47e0 user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to index.json.

1
2
3
4
5
6
7
8
9
10
...
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
...
537
538
539
540
541
542
543
544
{"tip": {
	"539":{"url":"./tip/539.md","tcl-ticket":"2370575","keywords":"Tcl, dict filter, set intersection","created":"27-Nov-2008","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 539: Multiple dict filter patterns","author":["Lars Hellström <[email protected]>"],"is-jest":false},
	"538":{"url":"./tip/538.md","keywords":"Tcl","created":"9-April-2019","post-history":"","state":"Draft","tcl-branch":"digit-bit-60","tcl-version":"8.7","vote":"","type":"Project","title":"# TIP 538: Externalize libtommath","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"537":{"url":"./tip/537.md","keywords":"Tcl","created":"7-April-2019","post-history":"","state":"Draft","tcl-branch":"regexp-api-64bit","tcl-version":"9.0","vote":"","type":"Project","title":"# TIP 537: Enable 64-bit indexes in regexp matching","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"536":{"url":"./tip/536.md","keywords":"Tk","created":"29-March-2019","post-history":"","state":"Draft","tk-branch":"mac_services","tcl-version":"8.6","vote":"","type":"Project","title":"# TIP 536: Improvements to Mac-specific IPC in Tk","author":["Kevin Walzer <[email protected]>"],"is-jest":false},
	"535":{"url":"./tip/535.md","keywords":"Tcl","created":"10-March-2019","post-history":"","state":"Final","tcl-branch":"scale-tick-format","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 535: Remove trailing zeroes in scale ticks","author":["Francois Vogel <[email protected]>"],"is-jest":false},
	"534":{"url":"./tip/534.md","keywords":"Tcl","created":"02-March-2019","post-history":"","state":"Draft","tcl-branch":"dkf-experimental-fast-number-hash","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 534: Faster Hashing of Small Integers","author":["Donal K. Fellows <[email protected]>"],"is-jest":false},
	"533":{"url":"./tip/533.md","keywords":"Tk, menubutton","":"","[menu man page](https":"//www.tcl.tk/man/tcl/TkCmd/menu.htm).","state":"Final","type":"Project","tk-branch":"bug-70e531918e","author":["Marc Culler"],"three arguments":"two coordinates and an index.  That function uses the","[70e531918e](https":"//core.tcl-lang.org/tk/tktview/70e531918e6d99cbdd8b527386fec15872c64216).","created":"13-Jan-2019","by calling <b>":":tk::PostOverPoint</b> which, like the proposed extension, accepts","a method <b>[nsmenu popupmenupositioningitem":"atLocation:inView]</b> which draws the","title":"# TIP 533: Extension of the menu post command.","the [bug-70e531918e](https":"//core.tcl-lang.org/tk/timeline?r=bug-70e531918e)","post-history":"","vote":"Done","tcl-version":"8.6","is-jest":false},
	"532":{"url":"./tip/532.md","moreover the following issues have been solved":"","keywords":"Tk, bind, event, event loop","":"","[generic/tkbind.c](http":"//core.tcl.tk/tk/artifact/e41f45f7f6ac3447?ln=3287-3307).","this has been observed in applications [scid](http":"//scid.sourceforge.net), and","state":"Draft","branch [bug6e8afe516d-87](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d-87)","type":"Project","tk-branch":"bug6e8afe516d","issue (1)":"Legacy implementation is computing the time difference of nth click with first click,","says (<code>man bind</code>)":"","author":["Gregor Cramer <[email protected]>"],"(same with applications [scid](http":"//scid.sourceforge.net), and","[bind-33.13](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6550-6566).","5. legacy implementation cannot handle homogeneous equal sequences properly, see this script":"","branch [bug6e8afe516d](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d)","2. immediately after startup of application [scidb](http":"//scidb.sourceforge.net)","[bug6e8afe516d](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d)","created":"09-Jan-2019","manual (<code>man bind</code>) says":"","[bind-32.2](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6123-6143)).","title":"# TIP 532: Re-implementation of event loop processing.","how to choose the most specific binding, has to be changed":"","4. see following code":"","can be expressed in a different way":"","[bind-32.4](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6158-6171).","this problem occurs often in application [scidb](http":"//scidb.sourceforge.net),","post-history":"","[bind-32.6](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6172-6191).","vote":"Pending","tcl-version":"8.6 and 8.7","[severe bugs in binding (tkbind.c)](https":"//core.tcl-lang.org/tk/tktview/6e8afe516df85f6213f436ef7c2fab2ec2d11c76).","[scid vs pc](http":"//scidvspc.sourceforge.net).","the following problems, caused by event ring overflow, have been solved":"","is-jest":false},
	"531":{"url":"./tip/531.md","keywords":"Tcl, stubs","":"","state":"Draft","type":"Project","author":["Shannon Noe <[email protected]>"],"created":"14-Dec-2018","title":"# TIP 531: Static Tcl Interpreter Creation Function","post-history":"","vote":"Pending","tcl-version":"8.7","tcl-branch":"tip-531","/usr/local/include/tcl8.6/tcldecls.h":"#define Tcl_CreateInterp \\","is-jest":false},
................................................................................
	"349":{"url":"./tip/349.md","created":"17-Apr-2009","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 349: New \"-cargo\" option for every Tk widget","author":["Zbigniew Baniewski <[email protected]>"],"is-jest":false},
	"348":{"url":"./tip/348.md","tcl-ticket":"2868499","keywords":"Tcl,debugging","created":"26-Feb-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 348: Substituted 'errorstack' / 'traceback'","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"347":{"url":"./tip/347.md","keywords":"Tcl","created":"09-Feb-2009","obsoleted-by":"395","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 347: Align 'string is ...' to Type-Conversion Functions in 'expr'","discussions-to":"news:comp.lang.tcl","author":["Jos Decoster <[email protected]>"],"is-jest":false},
	"346":{"url":"./tip/346.md","tcl-ticket":"1665628","keywords":"Tcl,encoding,convertto,strict,Unicode,String,ByteArray","created":"02-Feb-2009","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 346: Error on Failed String Encodings","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"345":{"url":"./tip/345.md","tcl-ticket":"2564363","keywords":"Tcl,encoding,invalid UTF-8","created":"05-Feb-2009","post-history":"","state":"Final","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 345: Kill the 'identity' Encoding","discussions-to":"Tcl Core List","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"344":{"url":"./tip/344.md","created":"31-Dec-2008","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 344: Bring TCP_NODELAY and SO_KEEPALIVE to socket options","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"343":{"url":"./tip/343.md","tcl-ticket":"2368084","keywords":"Tcl,binary","created":"03-Dec-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 343: A Binary Specifier for [format/scan]","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"342":{"url":"./tip/342.md","keywords":"dictionary, default value","state":"Accepted","type":"Project","author":["Lars Hellström <[email protected]>"],"votes-for":"DKF, JN, DGP, SL, AK","votes-against":"none","created":"27-Nov-2008","title":"# TIP 342: Dict Get With Default","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-342","votes-present":"FV","is-jest":false},
	"341":{"url":"./tip/341.md","tcl-ticket":"2370575","keywords":"Tcl, set intersection","created":"27-Nov-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 341: Multiple 'dict filter' Patterns","author":["Lars Hellström <[email protected]>"],"is-jest":false},
	"340":{"url":"./tip/340.md","keywords":"Tcl_SetResult","created":"14-Nov-2008","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 340: Const Qualification of Tcl_SetResult's Argument","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"339":{"url":"./tip/339.md","created":"14-Nov-2008","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 339: Case-Insensitive Package Names","author":["Andreas Kupries <[email protected]>"],"is-jest":false},
	"338":{"url":"./tip/338.md","keywords":"Tcl, Tk, tclsh, wish","created":"22-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 338: Embedder Access to Startup Scripts of *_Main()","author":["Don Porter <[email protected]>"],"is-jest":false},
	"337":{"url":"./tip/337.md","created":"21-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 337: Make TclBackgroundException() Public","author":["Don Porter <[email protected]>"],"is-jest":false},
	"336":{"url":"./tip/336.md","created":"21-Oct-2008","post-history":"","state":"Final","tcl-branch":"tip-330-336","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 336: Supported Access To interp->errorline","author":["Don Porter <[email protected]>"],"is-jest":false},
	"335":{"url":"./tip/335.md","keywords":"numLevels,embedding,terminate,async,thread,safe,gc","created":"13-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 335: An API for Detecting Active Interpreters","author":["Joe Mistachkin <[email protected]>"],"is-jest":false},
................................................................................
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <[email protected]>","Donal K. Fellows <[email protected]>","Larry W. Virden <[email protected]>","Larry W. Virden <[email protected]>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>","Don Porter <[email protected]>","Mo DeJong <[email protected]>","Larry W. Virden <[email protected]>","Kevin Kenny <[email protected]>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","post-history":"","state":"Active","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <[email protected]>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <[email protected]>"],"is-jest":false},
	"@min": 0,
	"@max": 539
}, "@timestamp": 1555258052}

|







 







|







 







|
1
2
3
4
5
6
7
8
9
10
...
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
...
537
538
539
540
541
542
543
544
{"tip": {
	"539":{"url":"./tip/539.md","tcl-ticket":"2370575","keywords":"Tcl, dict filter, set intersection","created":"27-Nov-2008","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 539: Multiple dict filter patterns","author":["Lars Hellström <[email protected]>"],"is-jest":false},
	"538":{"url":"./tip/538.md","keywords":"Tcl","created":"9-April-2019","post-history":"","state":"Draft","tcl-branch":"digit-bit-60","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 538: Externalize libtommath","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"537":{"url":"./tip/537.md","keywords":"Tcl","created":"7-April-2019","post-history":"","state":"Draft","tcl-branch":"regexp-api-64bit","tcl-version":"9.0","vote":"","type":"Project","title":"# TIP 537: Enable 64-bit indexes in regexp matching","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"536":{"url":"./tip/536.md","keywords":"Tk","created":"29-March-2019","post-history":"","state":"Draft","tk-branch":"mac_services","tcl-version":"8.6","vote":"","type":"Project","title":"# TIP 536: Improvements to Mac-specific IPC in Tk","author":["Kevin Walzer <[email protected]>"],"is-jest":false},
	"535":{"url":"./tip/535.md","keywords":"Tcl","created":"10-March-2019","post-history":"","state":"Final","tcl-branch":"scale-tick-format","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 535: Remove trailing zeroes in scale ticks","author":["Francois Vogel <[email protected]>"],"is-jest":false},
	"534":{"url":"./tip/534.md","keywords":"Tcl","created":"02-March-2019","post-history":"","state":"Draft","tcl-branch":"dkf-experimental-fast-number-hash","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 534: Faster Hashing of Small Integers","author":["Donal K. Fellows <[email protected]>"],"is-jest":false},
	"533":{"url":"./tip/533.md","keywords":"Tk, menubutton","":"","[menu man page](https":"//www.tcl.tk/man/tcl/TkCmd/menu.htm).","state":"Final","type":"Project","tk-branch":"bug-70e531918e","author":["Marc Culler"],"three arguments":"two coordinates and an index.  That function uses the","[70e531918e](https":"//core.tcl-lang.org/tk/tktview/70e531918e6d99cbdd8b527386fec15872c64216).","created":"13-Jan-2019","by calling <b>":":tk::PostOverPoint</b> which, like the proposed extension, accepts","a method <b>[nsmenu popupmenupositioningitem":"atLocation:inView]</b> which draws the","title":"# TIP 533: Extension of the menu post command.","the [bug-70e531918e](https":"//core.tcl-lang.org/tk/timeline?r=bug-70e531918e)","post-history":"","vote":"Done","tcl-version":"8.6","is-jest":false},
	"532":{"url":"./tip/532.md","moreover the following issues have been solved":"","keywords":"Tk, bind, event, event loop","":"","[generic/tkbind.c](http":"//core.tcl.tk/tk/artifact/e41f45f7f6ac3447?ln=3287-3307).","this has been observed in applications [scid](http":"//scid.sourceforge.net), and","state":"Draft","branch [bug6e8afe516d-87](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d-87)","type":"Project","tk-branch":"bug6e8afe516d","issue (1)":"Legacy implementation is computing the time difference of nth click with first click,","says (<code>man bind</code>)":"","author":["Gregor Cramer <[email protected]>"],"(same with applications [scid](http":"//scid.sourceforge.net), and","[bind-33.13](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6550-6566).","5. legacy implementation cannot handle homogeneous equal sequences properly, see this script":"","branch [bug6e8afe516d](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d)","2. immediately after startup of application [scidb](http":"//scidb.sourceforge.net)","[bug6e8afe516d](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d)","created":"09-Jan-2019","manual (<code>man bind</code>) says":"","[bind-32.2](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6123-6143)).","title":"# TIP 532: Re-implementation of event loop processing.","how to choose the most specific binding, has to be changed":"","4. see following code":"","can be expressed in a different way":"","[bind-32.4](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6158-6171).","this problem occurs often in application [scidb](http":"//scidb.sourceforge.net),","post-history":"","[bind-32.6](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6172-6191).","vote":"Pending","tcl-version":"8.6 and 8.7","[severe bugs in binding (tkbind.c)](https":"//core.tcl-lang.org/tk/tktview/6e8afe516df85f6213f436ef7c2fab2ec2d11c76).","[scid vs pc](http":"//scidvspc.sourceforge.net).","the following problems, caused by event ring overflow, have been solved":"","is-jest":false},
	"531":{"url":"./tip/531.md","keywords":"Tcl, stubs","":"","state":"Draft","type":"Project","author":["Shannon Noe <[email protected]>"],"created":"14-Dec-2018","title":"# TIP 531: Static Tcl Interpreter Creation Function","post-history":"","vote":"Pending","tcl-version":"8.7","tcl-branch":"tip-531","/usr/local/include/tcl8.6/tcldecls.h":"#define Tcl_CreateInterp \\","is-jest":false},
................................................................................
	"349":{"url":"./tip/349.md","created":"17-Apr-2009","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 349: New \"-cargo\" option for every Tk widget","author":["Zbigniew Baniewski <[email protected]>"],"is-jest":false},
	"348":{"url":"./tip/348.md","tcl-ticket":"2868499","keywords":"Tcl,debugging","created":"26-Feb-2009","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 348: Substituted 'errorstack' / 'traceback'","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"347":{"url":"./tip/347.md","keywords":"Tcl","created":"09-Feb-2009","obsoleted-by":"395","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 347: Align 'string is ...' to Type-Conversion Functions in 'expr'","discussions-to":"news:comp.lang.tcl","author":["Jos Decoster <[email protected]>"],"is-jest":false},
	"346":{"url":"./tip/346.md","tcl-ticket":"1665628","keywords":"Tcl,encoding,convertto,strict,Unicode,String,ByteArray","created":"02-Feb-2009","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 346: Error on Failed String Encodings","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"345":{"url":"./tip/345.md","tcl-ticket":"2564363","keywords":"Tcl,encoding,invalid UTF-8","created":"05-Feb-2009","post-history":"","state":"Final","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 345: Kill the 'identity' Encoding","discussions-to":"Tcl Core List","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"344":{"url":"./tip/344.md","created":"31-Dec-2008","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 344: Bring TCP_NODELAY and SO_KEEPALIVE to socket options","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"343":{"url":"./tip/343.md","tcl-ticket":"2368084","keywords":"Tcl,binary","created":"03-Dec-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 343: A Binary Specifier for [format/scan]","author":["Alexandre Ferrieux <[email protected]>"],"is-jest":false},
	"342":{"url":"./tip/342.md","keywords":"dictionary, default value","state":"Final","type":"Project","author":["Lars Hellström <[email protected]>"],"votes-for":"DKF, JN, DGP, SL, AK","votes-against":"none","created":"27-Nov-2008","title":"# TIP 342: Dict Get With Default","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-342","votes-present":"FV","is-jest":false},
	"341":{"url":"./tip/341.md","tcl-ticket":"2370575","keywords":"Tcl, set intersection","created":"27-Nov-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 341: Multiple 'dict filter' Patterns","author":["Lars Hellström <[email protected]>"],"is-jest":false},
	"340":{"url":"./tip/340.md","keywords":"Tcl_SetResult","created":"14-Nov-2008","post-history":"","state":"Withdrawn","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 340: Const Qualification of Tcl_SetResult's Argument","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
	"339":{"url":"./tip/339.md","created":"14-Nov-2008","post-history":"","state":"Rejected","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 339: Case-Insensitive Package Names","author":["Andreas Kupries <[email protected]>"],"is-jest":false},
	"338":{"url":"./tip/338.md","keywords":"Tcl, Tk, tclsh, wish","created":"22-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 338: Embedder Access to Startup Scripts of *_Main()","author":["Don Porter <[email protected]>"],"is-jest":false},
	"337":{"url":"./tip/337.md","created":"21-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 337: Make TclBackgroundException() Public","author":["Don Porter <[email protected]>"],"is-jest":false},
	"336":{"url":"./tip/336.md","created":"21-Oct-2008","post-history":"","state":"Final","tcl-branch":"tip-330-336","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 336: Supported Access To interp->errorline","author":["Don Porter <[email protected]>"],"is-jest":false},
	"335":{"url":"./tip/335.md","keywords":"numLevels,embedding,terminate,async,thread,safe,gc","created":"13-Oct-2008","post-history":"","state":"Final","tcl-version":"8.6","vote":"Done","type":"Project","title":"# TIP 335: An API for Detecting Active Interpreters","author":["Joe Mistachkin <[email protected]>"],"is-jest":false},
................................................................................
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <[email protected]>","Donal K. Fellows <[email protected]>","Larry W. Virden <[email protected]>","Larry W. Virden <[email protected]>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>","Don Porter <[email protected]>","Mo DeJong <[email protected]>","Larry W. Virden <[email protected]>","Kevin Kenny <[email protected]>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","post-history":"","state":"Active","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <[email protected]>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <[email protected]>"],"is-jest":false},
	"@min": 0,
	"@max": 539
}, "@timestamp": 1555421479}

Changes to index.md.

1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
<td valign='top'><a href='./tip/343.md'>343</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.6</td>
<td valign='top'>Final</td>
<td valign='top'># TIP 343: A Binary Specifier for [format/scan]</td>
<td valign='top'><a href='/tcl/tktview/2368084'>Link</a></td>
</tr>
<tr class='project projectaccepted projectaccepted87 project87'>
<td valign='top'><a href='./tip/342.md'>342</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.7</td>
<td valign='top'>Accepted</td>
<td valign='top'># TIP 342: Dict Get With Default</td>
<td valign='top'><a href='/tcl/timeline?r=tip-342'>Link</a></td>
</tr>
<tr class='project projectfinal projectfinal86 project86'>
<td valign='top'><a href='./tip/341.md'>341</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.6</td>






|



|







1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
<td valign='top'><a href='./tip/343.md'>343</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.6</td>
<td valign='top'>Final</td>
<td valign='top'># TIP 343: A Binary Specifier for [format/scan]</td>
<td valign='top'><a href='/tcl/tktview/2368084'>Link</a></td>
</tr>
<tr class='project projectfinal projectfinal87 project87'>
<td valign='top'><a href='./tip/342.md'>342</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.7</td>
<td valign='top'>Final</td>
<td valign='top'># TIP 342: Dict Get With Default</td>
<td valign='top'><a href='/tcl/timeline?r=tip-342'>Link</a></td>
</tr>
<tr class='project projectfinal projectfinal86 project86'>
<td valign='top'><a href='./tip/341.md'>341</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.6</td>

Changes to tip/342.md.

1
2
3
4
5
6
7
8
9
10
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
37
38
39
40
41
42
43


44
45
46
47
48
49
50
...
147
148
149
150
151
152
153













154
155
156
157
# TIP 342: Dict Get With Default
	Author:		Lars Hellström <[email protected]>
	State:		Accepted
	Type:		Project
	Vote:		Done
	Tcl-Version:	8.7
	Created:	27-Nov-2008
	Keywords:	dictionary, default value
	Post-History:	
	Tcl-Branch:     tip-342
................................................................................

# Specification

The **dict** command will get a new subcommand

 > **dict getwithdefault** _dictionary_ _key_ ?_key_ ...?  _value_

\(I consider the name of this subcommand very much open for discussion\) which
modulo error messages behaves like

	 proc dict_getwithdefault {D args} {
	     if {[dict exists $D {*}[lrange $args 0 end-1]]} then {
	         dict get $D {*}[lrange $args 0 end-1]
	     } else {
	         lindex $args end
	     }
................................................................................

i.e., it returns the value from the _dictionary_ corresponding to the
sequence of _key_s if it exists, or the default _value_ otherwise. As with
**dict exists**, it is OK \(and will cause the default _value_ to be
returned\) if one of the _key_s is missing from its dictionary, but an error
is thrown if this path of keys cannot be traversed because the value
associated with the previous key is not a dictionary.



# Rationale

It is clear that getting a value from a dictionary if it exists and using a
default otherwise is a common operation, but it is also clear that this can be
carried out with a combination of existing Tcl commands. Hence the issue is
whether a new subcommand for this improves efficiency and convenience of this
................................................................................
compared to the functional parts of the command and compared to the amount of
code needed to do it in the core.

# Reference Implementation

An implementation is provided, in [patch #2370575](https://core.tcl-lang.org/tcl/tktview/2370575).














# Copyright

This document has been placed in the public domain. 


|







 







<
|







 







>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>



<
1
2
3
4
5
6
7
8
9
10
..
20
21
22
23
24
25
26

27
28
29
30
31
32
33
34
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

# TIP 342: Dict Get With Default
	Author:		Lars Hellström <[email protected]>
	State:		Final
	Type:		Project
	Vote:		Done
	Tcl-Version:	8.7
	Created:	27-Nov-2008
	Keywords:	dictionary, default value
	Post-History:	
	Tcl-Branch:     tip-342
................................................................................

# Specification

The **dict** command will get a new subcommand

 > **dict getwithdefault** _dictionary_ _key_ ?_key_ ...?  _value_


which, modulo error messages, behaves like

	 proc dict_getwithdefault {D args} {
	     if {[dict exists $D {*}[lrange $args 0 end-1]]} then {
	         dict get $D {*}[lrange $args 0 end-1]
	     } else {
	         lindex $args end
	     }
................................................................................

i.e., it returns the value from the _dictionary_ corresponding to the
sequence of _key_s if it exists, or the default _value_ otherwise. As with
**dict exists**, it is OK \(and will cause the default _value_ to be
returned\) if one of the _key_s is missing from its dictionary, but an error
is thrown if this path of keys cannot be traversed because the value
associated with the previous key is not a dictionary.

To facilitate easy use by lazy programmers, it will be aliased as **dict getdef**.

# Rationale

It is clear that getting a value from a dictionary if it exists and using a
default otherwise is a common operation, but it is also clear that this can be
carried out with a combination of existing Tcl commands. Hence the issue is
whether a new subcommand for this improves efficiency and convenience of this
................................................................................
compared to the functional parts of the command and compared to the amount of
code needed to do it in the core.

# Reference Implementation

An implementation is provided, in [patch #2370575](https://core.tcl-lang.org/tcl/tktview/2370575).

# Alternate Names

The following alternate names were considered for **getwithdefault** during
the TIP voting period:

 * **getdef** — selected.
 * **default** — feels like it should address the topics of defaults more widely.
 * **fetch** — consensus is that this should be a command with a different
   return signature if/when such is created (e.g., a boolean to say whether
   the value was found).
 * **get?** — rejected as Tcl's own commands (mostly) do not use non-alpha
   characters in their names, leaving more space for user code.

# Copyright

This document has been placed in the public domain.