Tcl the Misunderstood (2006)
antirez.com
Tcl the Misunderstood (2006)
1–10 of 81 posts
Re: Tcl the Misunderstood (2006)
#2This seems very slightly disingenuous, if my memory is correct. I don't remember all the details, but I ran into an issue with a Tcl application a while back and Unicode support. Digging into it, I recall that the Tcl interpreter actually represents every character as a predefined number of bytes, set by a preprocessor definition. The default was 2, and cut off any Unicode character that needed more than 2 bytes to encode, unless you were willing to recompile the interpreter to use 4 bytes, at the cost of doubling memory consumption for every string.
Very nitpicky, but I think it's important to point out it's not "quite" utf-8, because Tcl needs each codepoint to be O(1) indexable in an array, something normal utf-8 can't do.
Re: Tcl the Misunderstood (2006)
#3Re: Tcl the Misunderstood (2006)
#4> Every string is internally encoded in utf-8, all the string operations are Unicode-safe This seems very slightly disingenuous, if my memory is correct. I don't remember all the details, but I ran into an issue with a Tcl application a while back and Unicode support. Digging into it, I recall that the Tcl interpreter actually represents every character as a predefined number of bytes, set by a preprocessor definitio…
Ah, that’s exactly what old python did. Wonder of it was inspired by the tcl solution.
Fwiw because they rejected indexing recent cpython uses a variable encoding based on contents (possibilities are iso-8859-1, ucs2, or ucs4). That does mean adding an astral codepoint to an ASCII string quadruples its size.
Pypy, on the other hand, uses utf-8.
Re: Tcl the Misunderstood (2006)
#5Put differently: The command line ergonomics of POSIX shell, with the scripting ergonomics of Lisp
Re: Tcl the Misunderstood (2006)
#6Re: Tcl the Misunderstood (2006)
#7Re: Tcl the Misunderstood (2006)
#8Quoted post unavailable.
From the HN Guidelines.
Note the lack of the pattern "new" anywhere in there.
Re: Tcl the Misunderstood (2006)
#9Re: Tcl the Misunderstood (2006)
#10Of course some of these features were already present in other languages. However, steady improvements to Tcl have pushed the language well beyond how it was described in the article. Definitely not a "toy" but overall as capable as the other scripting tools out there.