News for hackers. Stuff that matters.
Re:picol: A Tcl interpreter in 500 lines of code by pjmlp on Monday February 16, 2026 @07:09AM (#47034048)
Tcl has stopped being everything a string with the release of Tcl 8.0 and bytecode engine.

> In earlier versions of Tcl, strings were used as a universal representation; in Tcl 8.0 strings are replaced with Tcl_Obj structures ("objects") that can hold both a string value and an internal form such as a binary integer or compiled bytecodes.

http://www.ira.inaf.it/Computing/manuals/tcl/man-8.0/Changes...

I remember this quite well, because as part of the core team tasked with writing native C extensions, the migration to Tcl 8 had quite an impact on our code.

I learned Python with version 1.6, and have a few O'Reilley books proving the point the language wasn't really that simple, those that never bothered reading the reference manuals end-to-end though it was.

Re:picol: A Tcl interpreter in 500 lines of code by apgwoz on Monday February 16, 2026 @12:54PM (#47037994)
There have always been attempts at caching non-string values in Tcl for performance gains, but the semantics are the same. The value’s types are whatever the operator requires and an error when not compatible. If, internally, $x is an integer, and you pass it to a string function, well, $x gets temporarily turned into a string. Dynamic with “weak” types.
Re:picol: A Tcl interpreter in 500 lines of code by pjmlp on Monday February 16, 2026 @02:55PM (#47039488)
Which is exactly the quoted text.
Re:picol: A Tcl interpreter in 500 lines of code by apgwoz on Monday February 16, 2026 @04:06PM (#47040334)
No. The quoted text says nothing about the value semantics, only the representation…
Re:picol: A Tcl interpreter in 500 lines of code by pjmlp on Monday February 16, 2026 @04:51PM (#47040820)
Well, if you followed the link under the quoted text, you would get the next sentence,

> The new objects make it possible to store information in efficient internal forms and avoid the constant translations to and from strings that occurred with the old interpreter.

Re:picol: A Tcl interpreter in 500 lines of code by apgwoz on Monday February 16, 2026 @06:53PM (#47041940)
Huh? I know how it works. My point is different than the representation.