TIP 624: Deprecate Tcl_MakeSafe

Author:        Jan Nijtmans <[email protected]>
State:         Final
Type:          Project
Vote:          Done
Created:       06-April-2022
Tcl-Version:   8.7
Keywords:      Tcl
Tcl-Branch:    rfe-655300
Vote-Summary   Accepted 5/0/1
Votes-For:     DGP, FV, JN, KBK, SL
Votes-Against: none
Votes-Present: MC


This TIP proposes to deprecate Tcl_MakeSafe, and fully remove it in Tcl 9.0


For a discussion why Tcl_MakeSafe is bad, see [https://core.tcl-lang.org/tcl/tktview?name=655300 RFE 655300].

There is no known extension using Tcl_MakeSafe. And if there were, Tcl_MakeSafe would not be doing the expected job anyway. It is not - generally - possible for a non-safe interpreter to become safe: The core doesn't know which of the commands added after construction are supposed to be safe or not. So, the only way to create a safe interpreter should be to start with one from the start.


See branch rfe-655300


This document has been placed in the public domain.