News for hackers. Stuff that matters.
Re:Fun with regular expressions: part I by JadeNB on Friday August 20, 2021 @12:11PM (#28247682)
> I think you’re confusing “regular expression” (RE) for “deterministic finite-state automata” (DFA).

I think it's about descriptivism vs prescriptivism. "Regular expression" did start life with a technical meaning, according to which REs had equivalent expressive power to DFAs. The term has since been appropriated and diluted by other languages, and it is not entirely unreasonable to (though I prefer not to) take "regular expression" to mean "whatever programming languages present as regular expression"; but I think it's not quite right to say that someone is confused who believes in maintaining the original distinction.

Re:Fun with regular expressions: part I by nsajko on Friday August 20, 2021 @12:49PM (#28248217)
I agree with you (obviously), but I'm not sure we should invoke "descriptivism vs prescriptivism" here. As far as I understand that distinction is mostly applicable to English (or other natural language) teaching, which is usually quite prescriptive, but should also have varying descriptive elements. And to dictionaries, which are(?) mostly descriptive (even when that means listing two conflicting definitions for a single word), but have to make some prescriptive editing decisions.

When it comes to actual semantic issues like this one, I think that invoking "p vs d" just muddies the waters, because such issues should be examined on a case-by-case basis.

This issue specifically is quite akin to the "literally" case: different instances of usage of the same phrase have (almost) opposite meanings:

See https://en.wiktionary.org/wiki/literally and https://en.wikipedia.org/wiki/Chomsky_hierarchy

I think it's fair to say the Perl-style semantics are just wrong, because there's no way to use them without being confusing.