4 ms·
Does Knuth's version handle those words? Since that would discredit the article's claim that McIlroy's version was bug-free.
by oconnor0 15y ago
Does Knuth's version handle those words? Since that would discredit the article's claim that McIlroy's version was bug-free.
- telemachos 15y agoI don't know (I haven't seen the full original articles.) One of the McIlroy quotes mentions "handling of punctuation" and "isolation of words", so clearly they were thinking of some of these edge cases. > In particular the isolation of words, the handling of punctuation, and the treatment of case distinctions are built in.
- qdog 15y agoAlthough the consensus seems to be contractions count as one word, some people still believe they should count as two. I suppose then the problem would be counting "can't" as a "can" and a "not". Bug-free seems a bit of a strong claim either way, good catch ;)
- tjr 15y agoWhether if it does or doesn't, it probably includes an explanation as to why it does or doesn't, perhaps with references to articles going into more detail on the virtues of each possibility.
- jhck 15y agoNo, Knuth's version doesn't handle those words either. Here's how he defines a word in his literate program: Let's agree that a word is a sequence of one or more contiguous letters; "Bentley" is a word, but "ain't" isn't. The sequence of letters should be maximal, in the sense that it cannot be lengthened without including a nonletter.