Tcl 是否具有 Perl 绑定哈希 class 的等价物?

Does Tcl have an equivalent of Perl tied hash class?

保持插入顺序+搜索算法平均复杂度。

使用dict,你可以做到这一点。希望对您有所帮助。

% set website [dict create name Whosebug protocol HTTP port 80]
name Whosebug protocol HTTP port 80
% dict get $website
name Whosebug protocol HTTP port 80
% dict get $website name
Whosebug
%