Check-in [b468ad2d36]

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:New TIP.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b468ad2d36e2f1d6f599a7313dc16add39a35c9be135e5c392eecd4848a237a9
User & Date: dkf 2019-06-11 18:48:06
Context
2019-06-11
19:03
Clarify a few things. check-in: 86042fe174 user: dkf tags: trunk
18:48
New TIP. check-in: b468ad2d36 user: dkf tags: trunk
2019-06-10
18:08
Note two TIPs' implementation branches check-in: d7e07557f8 user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to index.json.

1

2
3
4
5
6
7
8
...
546
547
548
549
550
551
552
553
554
{"tip": {

	"549":{"url":"./tip/549.md","keywords":"Tcl","created":"7-June-2019","post-history":"","state":"Draft","tcl-branch":"tip-549","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 549: Make configure --enable-64bit the default","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Jan Nijtmans <[email protected]>"],"is-jest":false},
	"548":{"url":"./tip/548.md","keywords":"Tcl","created":"3-June-2019","post-history":"","state":"Draft","tcl-branch":"tip-548","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 548:Deprecate Tcl\\_WinUtfToTChar() and Tcl\\_WinTCharToUtf() and provide more flexible replacement functions.","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Jan Nijtmans <[email protected]>"],"is-jest":false},
	"547":{"url":"./tip/547.md","keywords":"Tcl","created":"31-May-2019","post-history":"","state":"Draft","tcl-branch":"tip-547","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 547: New encodings: UTF-16, UCS-2.","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Jan Nijtmans <[email protected]>"],"is-jest":false},
	"546":{"url":"./tip/546.md","keywords":"Tcl, traces","created":"20-May-2019","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 546: Typedefs to Support Source-Compatible Migration","author":["Don Porter <[email protected]>"],"is-jest":false},
	"545":{"url":"./tip/545.md","keywords":"Tk, image","created":"19-May-2019","state":"Draft","tk-branch":"tip-545-svg-options","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 545: image photo SVG options: remove -unit and add target height/width option","author":["Harald Oehlmann <[email protected]>"],"is-jest":false},
	"544":{"url":"./tip/544.md","keywords":"Tcl","created":"15-May-2019","post-history":"","state":"Final","tcl-branch":"tip-544","vote":"Done","tcl-version":"8.7","type":"Project","title":"# TIP 544: Export TclGetIntForIndex()","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Fran├žois Vogel <[email protected]>"],"is-jest":false},
	"543":{"url":"./tip/543.md","keywords":"Tcl, traces","created":"10-May-2019","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.0","type":"Project","title":"# TIP 543: Eliminate TCL\\_INTERP\\_DESTROYED flag value","author":["Don Porter <[email protected]>"],"is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <[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","obsoleted-by":"467","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","obsoleted-by":"386","post-history":"","state":"Withdrawn","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": 549
}, "@timestamp": 1560190057}
>







 







|
|
1
2
3
4
5
6
7
8
9
...
547
548
549
550
551
552
553
554
555
{"tip": {
	"550":{"url":"./tip/550.md","keywords":"Tcl, memory","created":"11-Jun-2019","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 550: Garbage Collection for TclOO","author":["Donal K. Fellows <[email protected]>"],"is-jest":false},
	"549":{"url":"./tip/549.md","keywords":"Tcl","created":"7-June-2019","post-history":"","state":"Draft","tcl-branch":"tip-549","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 549: Make configure --enable-64bit the default","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Jan Nijtmans <[email protected]>"],"is-jest":false},
	"548":{"url":"./tip/548.md","keywords":"Tcl","created":"3-June-2019","post-history":"","state":"Draft","tcl-branch":"tip-548","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 548:Deprecate Tcl\\_WinUtfToTChar() and Tcl\\_WinTCharToUtf() and provide more flexible replacement functions.","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Jan Nijtmans <[email protected]>"],"is-jest":false},
	"547":{"url":"./tip/547.md","keywords":"Tcl","created":"31-May-2019","post-history":"","state":"Draft","tcl-branch":"tip-547","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 547: New encodings: UTF-16, UCS-2.","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Jan Nijtmans <[email protected]>"],"is-jest":false},
	"546":{"url":"./tip/546.md","keywords":"Tcl, traces","created":"20-May-2019","post-history":"","state":"Draft","vote":"Pending","tcl-version":"8.7","type":"Project","title":"# TIP 546: Typedefs to Support Source-Compatible Migration","author":["Don Porter <[email protected]>"],"is-jest":false},
	"545":{"url":"./tip/545.md","keywords":"Tk, image","created":"19-May-2019","state":"Draft","tk-branch":"tip-545-svg-options","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 545: image photo SVG options: remove -unit and add target height/width option","author":["Harald Oehlmann <[email protected]>"],"is-jest":false},
	"544":{"url":"./tip/544.md","keywords":"Tcl","created":"15-May-2019","post-history":"","state":"Final","tcl-branch":"tip-544","vote":"Done","tcl-version":"8.7","type":"Project","title":"# TIP 544: Export TclGetIntForIndex()","discussions-to":"Tcl Core list","author":["Jan Nijtmans <[email protected]>","Fran├žois Vogel <[email protected]>"],"is-jest":false},
	"543":{"url":"./tip/543.md","keywords":"Tcl, traces","created":"10-May-2019","post-history":"","state":"Draft","vote":"Pending","tcl-version":"9.0","type":"Project","title":"# TIP 543: Eliminate TCL\\_INTERP\\_DESTROYED flag value","author":["Don Porter <[email protected]>"],"is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <[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","obsoleted-by":"467","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","obsoleted-by":"386","post-history":"","state":"Withdrawn","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": 550
}, "@timestamp": 1560278870}

Changes to index.md.

209
210
211
212
213
214
215








216
217
218
219
220
221
222
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>









<tr class='state-draft type-project version-87'>
<td valign='top'><a href='./tip/549.md'>549</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.7</td>
<td valign='top'>Draft</td>
<td valign='top' ><a href='./tip/549.md'>Make configure --enable-64bit the default</a></td>
<td valign='top'><a href='/tcl/timeline?r=tip-549'>Link</a></td>






>
>
>
>
>
>
>
>







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>

<tr class='state-draft type-project version-90'>
<td valign='top'><a href='./tip/550.md'>550</a></td>
<td valign='top'>Project</td>
<td valign='top'>9.0</td>
<td valign='top'>Draft</td>
<td valign='top' ><a href='./tip/550.md'>Garbage Collection for TclOO</a></td>
<td></td>
</tr>
<tr class='state-draft type-project version-87'>
<td valign='top'><a href='./tip/549.md'>549</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.7</td>
<td valign='top'>Draft</td>
<td valign='top' ><a href='./tip/549.md'>Make configure --enable-64bit the default</a></td>
<td valign='top'><a href='/tcl/timeline?r=tip-549'>Link</a></td>

Added tip/550.md.






































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# TIP 550: Garbage Collection for TclOO
	Author:         Donal K. Fellows <[email protected]>
	State:          Draft
	Type:           Project
	Vote:           Pending
	Created:        11-Jun-2019
	Post-History: 
	Tcl-Version:    9.0
	Keywords:       Tcl, memory
-----

# Abstract

This TIP changes the semantics of Tcl and TclOO so that objects can be
reclaimed automatically when they are no longer referenced.

# Rationale

One of the use patterns that people use TclOO for is to create relatively
short-lived objects that manage other things. Currently doing this requires
remembering to explicitly delete the objects once they are no longer needed,
usually by calling their `destroy` method, but this is comparatively
onerous. If we instead adopt a garbage collection mechanism, we can move
instead to deleting objects once they are no longer referenced by the rest of
the program; this is a reasonable fit for objects whose name is not
predetermined, as their name needs to be saved into a variable (or put inside
a list or other data-containing value) already in order for them to be usable.

# Specification

When the `new` method of `oo::class` is called, it picks a new unused name
currently. This behaviour shall be extended so that when the final reference
from Tcl code to that name is lost (which shall be determined through
mechanisms such as reference counting) the object will be deleted.

Each use of `self object` (or its common alias `self`) within the object shall
create another reference to the object. Looking it up through mechanisms such
as `info class instances` shall create another reference to the object (while
it exists).

Instances may also be explicitly deleted through all existing mechanisms.
After that, those existing references will be treated as if they were plain
strings.

# Implementation

To be done.

# Copyright

This document is placed in public domain.