2 ms·
Are they really, though? I've followed a few courses on this, and they all focus on the mathematical background of it. Sure, it's neat to be able to prove some
by crote 6y ago
Are they really, though?
I've followed a few courses on this, and they all focus on the mathematical background of it. Sure, it's neat to be able to prove some stuff about a toy language, but what does it really teach you?
"Regular expressions" in most programming languages are not regular. A lot of programming languages aren't even context-free. Heck, C++ templates are Turing complete! Does anyone care? Not really. It works, and unless you intentionally abuse it, it's not even that painful to use.
Meanwhile in academia, the parser is automatically generated from its EBNF definition using an algorithm proven to be optimal, but when you try to compile anything containing syntax errors it's either crash, infinite loop, or dump a completely gibberish error message.
I really get the feeling that a large part of academia is busy inventing their own problems to solve. From my experience, they are extremely bad at teaching how to solve real problems.
- qppo 6y agoAcademic research and education is normally focused on silo'd content and not holistic system design. To use your example, a parser that gracefully handles bad input is a completely different region of study than simple parsing/grammars. It's outside the context. That does not mean that academia does not cover the topic, you just probably wouldn't get to it in an undergraduate course on (frankly trivial) compilers and parsers. If you read into research on things like semantic fuzzing, the slow death of batch compilers, and the various error propagation mechanisms out there from PL researchers you'd see those topics bring up lively academic discussions. Academia lags in many ways behind practical designs because they aren't governed by deadlines and market realities, but they lead in many others precisely because ideas aren't constrained and they can focus on things that don't have immediate value to markets. It's not wise to discount an entire domain of expertise and culture of development just because it exists in a different context than professional engineering, particularly when we owe our entire industry to the efforts of academics in the first place.
- mattkrause 6y agoOne obvious lesson is that you shouldn't try to parse arbitrary, non-trivial HTML with regular expressions.