Skip to content

Comment on Why do regexes use `$` and `^` as line anchors?

Comments

So there you have it, an explanation for the regex anchors that kinda makes sense.

That’s not an explanation, it’s speculation. The whole article was guess work and you picked something that sounded plausible. Ken Thompson is alive, why not ask and confirm? Then you could say you have an explanation.

Explanations and speculation: are they mutually exclusive? I'd say an answer from Ken Thompson would be a definitive explanation that might disprove the author's explanation, but that doesn't mean it's not an explanation.

Explanations and speculation: are they mutually exclusive?

Yes. You only need to speculate when you don’t have a firm explanation.

disprove the author's explanation

Speculation is “the forming of a theory or conjecture without firm evidence”, which is what the author is doing. They’re not explaining, they’re guessing at a reason.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.