3 ms·
I'm strangely reminded of SQL syntax (emphasis mine): "The language contained an operator ITEM n OF s, which would return the nth word of the string s. (Yes, t
by Hexstream 17y ago
I'm strangely reminded of SQL syntax (emphasis mine):
"The language contained an operator ITEM n OF s, which would return the nth word of the string s. (Yes, that was a basic operator in the expression language; a function call syntax or a separate standard library would certainly have been well beyond the programmer's mental horizon.) But you could also alter the implicit use of whitespace as the ‘word’ separator, by writing ITEM n OF s SEPARATED BY d; this would allow you to, say, fetch the third field of a colon-delimited line. So far, nothing too out of the ordinary – except that one now naturally wonders which way ITEM a OF ITEM b OF c SEPARATED BY d would bracket, since it's exactly isomorphic to the well-known if–else ambiguity."