185 karma · joined September 18, 2015
set x 5
expr { $x + 3 }
'expr' receives x as the string 5 but knows to treat it as an int.I'm not sure that's a great explanation. Maybe a decent summary of the concept of 'no types' is "the language does not presume to tell you how you can or cannot use your data."
set condition-body {puts "Hello, world"}
if { $condition } $condition-body
To get this to run, you need to splice in the condition-body like so, if { $condition } {*}$condition-body
But you get the point.http://www.computerhistory.org/pdp-1/1020b307d766e0019de2b4a...
[Edit] I should say "one of the qualities." The other important one is that Tcl has no types. Even all the lisps I know have types.
But you might be interested to know there is currently an effort to get Tcl to compile to native/near-native code. Here is a paper on the new techniques being developed and a link to a talk given by one of the lead tcl core team members.
http://www.tcl-lang.org/community/tcl2015/assets/talk14/TheT...
> John McCarthy wrote 6 easy things in machine code
It was actually Steve Russel, McCarthy's grad student, who had the idea of writing McCarthy's eval function in machine code.