News for hackers. Stuff that matters.
Re:Dynamically Typed Languages (2009) by bch on Thursday August 21, 2014 @01:26PM (#8208482)
> At the extreme end of the spectrum, the TCL language implicitly converts every type into a string

This isn't the full story. Since 1997, Tcl has used Tcl_Obj internally. These are called "dual-ported objects", where there are two values contained therein: a string value, to maintain Tcls logical model of "Everything Is A String" (EIAS), and a native value of the last-used-type. For example, if the object was last used as an integer, a native int value will be stored in the "internalRep". If the next use of this value is in an int context, this native internalRep value will be used. If one uses a value in an int fashion one call, then a float the next, then an int, then a float, then an int... you will incur what is called "shimmering", where the interalRep is recomputed back/forth. Shimmering is something to avoid where possible.

There are no comments on this comment yet.