Anonymous user
Category talk:Tcl: Difference between revisions
m
→Language features: forgot to sign...
(→Language features: new section) |
m (→Language features: forgot to sign...) |
||
Line 16:
== Language features ==
Tcl uses a mixture of pass-by-value and pass-by-reference, and is very good at simulating pass-by-name too. The base language semantics are strictly pass-by-value; this was how everything was done up to Tcl 7.6, and when combined with the fact that it was also string based, it gave the language a (deserved) reputation for being slow. In Tcl 8.0 the language implementation was switched to pass-by-reference, with the entities being semantically immutable objects (the actual code is more nuanced than that, of course); that was a major part of why Tcl sped up with that version. The pass-by-name support is through the <code>[http://www.tcl.tk/man/tcl8.6/TclCmd/upvar.htm upvar]</code> command, which allows the looking-up of a variable in one scope and aliasing it to another variable in the current scope. —[[User:Dkf|Dkf]] 10:16, 31 May 2009 (UTC)
|