3 ms·
In this context, think of "text" as shorthand for unstructured text. Which is another subset of text. The sort of text that Unix tools traditionally handle. Col
by adrianmonk 8y ago
In this context, think of "text" as shorthand for unstructured text. Which is another subset of text. The sort of text that Unix tools traditionally handle. Colon-separated files like /etc/passwd, line-oriented files like /usr/share/dict/words, etc.
So, now we have two subsets of text, and it makes sense they can have different levels of expressiveness.
(Actually, unstructured is too extreme since there is a little structure. Something like "isomorphic to CSV" isn't quite right, but closer.)
- hjk05 8y ago“Colon-separated files” are not unstructured though. And arguing that s-expressions are more expressive than text because “text” excludes all structured examples of text seems like an excessive in definitional acrobacy acrobacy.
- kbp 8y agoBut Unix didn't adopt everything-is-colon-separated-values. Everything being unstructured text leads to a lot of different, incompatible ways of structuring that text. S-expressions themselves aren't important, I think, it's just having some standard structure that's used everywhere and you don't have to parse yourself. Trees are a good choice for a universal structure, hence things like XML. S-expressions are just a very lightweight and flexible format.
- adrianmonk 8y agoObviously I mean degrees of structure, not an absolute lack of structure. The goal of the definition isn't to give S-expressions an advantage so they can be proven superior and Lisp people can win the argument. It's to describe the sorts of files that actual existing command-line utilities (like this in Unix/Linux) can conveniently operate on. The "head" command deals in line-oriented fashion and can print the first N lines of a file. The "cut" command can select certain columns based on a line-oriented and character-delimited structure. There is no exact definition, but this gives you a general idea of what text files means in the context of "becoming a command line wizard".