```Tcl/Tk 9.1```
Tcl/Tk 9.1

原始链接: https://www.tcl-lang.org/software/tcltk/9.1.html

Tcl/Tk 9.1.0 于 2026 年 9 月发布。该版本在 9.0 版本的基础上,带来了重要的新功能、性能提升以及 API 更新。 **Tcl 9.1 亮点包括:** * **新命令:** `unicode`(标准化)、`timer`(单调时钟)和 `lfilter`。 * **语言增强:** 扩展了 `subst` 和 `switch` 选项,并在 `expr` 中引入了新的 C99 数学函数。 * **内部改进:** 提高了列表内存效率,支持 64 位大小,并更新了库与编码的搜索逻辑。 * **API 更新:** 增加了多个新的 C 程序例程,并使用 `long long` 对时间 API 进行了现代化改造。 * **平台特性:** 改进了 macOS 上对不区分大小写路径的处理,并优化了 Windows 上的执行搜索。 **Tk 9.1 亮点包括:** * **辅助功能与国际化:** 引入了屏幕阅读器支持以及初步的双向(RTL)文本支持。 * **新控件/工具:** 增加了 `ttk::toggleswitch` 和 `tk attribtable` 命令。 * **UI 改进:** 支持旋转文本,优化了 `ttk` 控件状态,改进了画布/列表框的视觉效果,并为对话框设置了物理屏幕宽度限制。 * **清理:** 移除了已过时的 Windows XP 外观支持。 这些更新共同实现了 Tcl/Tk 的现代化,提升了辅助功能、开发人员生产力以及跨平台性能。

Hacker News 上的讨论庆祝了 Tcl/Tk 9.1 的发布,以及 John Ousterhout 经久不衰的设计理念。评论者称赞 Tcl 独特的字符串中心语义、借助 `uplevel` 和 `upvar` 实现的强大元编程能力、可嵌入解释器、相互独立的实例、安全的子解释器、稳定的 C API、跨平台事件处理机制,以及“开箱即用”的标准库。Tk 同样受到推崇,因为它能用少量代码快速构建功能完善且轻量的桌面图形界面,不过 Tk 9.2 仍在开发原生的 Wayland 支持。 人们提到的应用包括 Cisco IOS、VLSI CAD 自动化、AOLServer、Tkinter、Expect、SQLite 开发、嵌入式系统、CGI,以及快速开发的内部工具。Tcl 的语法紧凑、接口稳定,也非常适合现代 AI 辅助编程。 怀疑者认为,它的灵活性和字符串类型设计容易催生风格不一致、难以维护的代码,尤其是在由供应商掌控的 CAD 环境中;同时,它的 POSIX 支持和现代应用普及程度仍然有限。提到的替代方案包括 Lua、Python、JavaScript、Ruby、GTK、Swing 和其他 GUI 工具包 Some threads drift into COBOL, Python’s GIL and pickle security, accessibility, and OmHacker News 上的讨论庆祝了 Tcl/Tk 9.1 的发布,以及 John Ousterhout 经久不衰的设计理念。评论者称赞 Tcl 独特的字符串中心语义、通过 `uplevel` 和 `upvar` 实现的强大元编程能力、可嵌入的解释器、相互独立的实例、安全的子解释器、稳定的 C API、跨平台事件处理机制,以及“开箱即用”的标准库。Tk 也备受推崇,因为它能用少量代码快速构建功能强大且轻量的桌面 GUI,不过 Tk 9.2 的原生 Wayland 支持仍在开发中。 人们提到的应用包括 Cisco IOS、VLSI CAD 自动化、AOLServer、Tkinter、Expect、SQLite 开发、嵌入式系统、CGI,以及快速开发的内部工具。Tcl 也很适合现代 AI 辅助编程,因为它的语法紧凑,接口稳定。 持怀疑态度的人认为,它的灵活性和字符串类型设计容易导致代码风格不一致、难以维护,尤其是在由供应商掌控的 CAD 环境中。此外,它的 POSIX 支持和现代应用普及程度仍然有限。被提到的替代方案包括 Lua、Python、JavaScript、Ruby、GTK、Swing 和其他 GUI 工具包。部分讨论还偏离主题,谈到 COBOL、Python 的 GIL 与 pickle 安全性、无障碍支持,以及 Omarchy。
相关文章

原文

Latest Release: Tcl/Tk 9.1.0 (Sep 29, 2026)

Tcl/Tk 9.1.0 is the current development work on Tcl and Tk, aiming toward stable releases in September 2026. They add new features and interfaces to the foundation of Tcl/Tk 9.0.

Highlights of Tcl 9.1

  • New command unicode: Unicode normalization
  • New C routines Tcl_UtfToNormalized*: Unicode normalization
  • New command timer: monotonic clock; microsecond resolution
  • New command lfilter: select items from list
  • New command interp set: variable access in child interpreter
  • New subst options: -backslashes, -commands, -variables.
  • New switch options: -integer.
  • Many C99 math routines now available as expr functions.
  • Applications now required to call an initialization routine, either Tcl_FindExecutable or TclZipfs_AppHook.
  • New C routine Tcl_IsEmpty.
  • New C routine Tcl_GetEncodingNameForUser.
  • New C routine Tcl_AttemptCreateHashEntry.
  • New C routines Tcl_ListObjRange, Tcl_ListObjRepeat, Tcl_ListObjReverse.
  • New C time API using long long in place of Tcl_Time
  • Case-insensitive filesystem paths on macOS.
  • auto_execok and exec search reform on Windows.
  • Revised searches for script library and encodings.
  • Improved list internals for memory efficiency of large lists.
  • Extended support for 64-bit sizes.

Highlights of Tk 9.1

  • Accessibility screen reader support.
  • Initial support for bidirectional text / RTL languages.
  • New widget ttk::toggleswitch.
  • New command tk attribtable.
  • send command revised and improved on Aqua.
  • Handling of negative screen distances.
  • Extended states in ttk::treeview and ttk::notebook
  • Improvements to Tk_CanvasTextInfo
  • Rotated text on labels
  • Limit message box and dialogs to physical screen width.
  • Improved listbox selection colors.
  • Removed obsolete support for Windows XP appearances.

联系我们 contact @ memedata.com