2 ms·
The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information. -- Alan P
by wanderer2323 7y ago
The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information. -- Alan Perlis
- ken 7y agoI think Tcl strings aren't exactly what Perlis was talking about. First, the language knows how they're used, so there's a JIT (or whatever) behind the scenes eliminating the literal deserialize-process-serialize pattern you see in shell scripts. Second, a lot of Tcl data types (hash tables, sockets, etc) can be represented by strings but the string is just a simple reference to a rich internal structure. It's almost more like a pointer than a string in other languages.
- lanstin 7y agoI know this item is old but surely no shell script should be limited by string copying of the language? Maybe string shuffling thru pipes, but that's the reason the CPU briefly spikes.