3 ms·
It's easy to alias expr to =, which enhances write- and readability : % interp alias {} = {} expr = % set x [= 2 + 3] 5 Also aliasing lindex to @ is n
by yesenadam 5y ago
It's easy to alias expr to =, which enhances write- and readability :
% interp alias {} = {} expr
=
% set x [= 2 + 3]
5
Also aliasing lindex to @ is nice
% interp alias {} @ {} lindex
% set a {1 2 3}
1 2 3
% @ $a 1
2
- pwg 5y agoAlso, if you set your namespace path like so: namespace path {::tcl::mathop ::tcl::mathfunc} Then you get very LISP like math operators % set x [+ 2 3 [- 5 20]] -10 and math functions % set x [abs -12] 12