Do theoretical computer science topics have “real world” development applications?

雨燕双飞 提交于 2019-12-03 05:53:05

问题


By "theoretical computer science topics", I am referring to things such as regular vs non-regular languages, the pumping lemma, and grammars.

I'm familiar with the real world applications of finite automata and regular expressions, but topics such as these other ones are giving me more problems as I'm not seeing any real world applications.


回答1:


These things are useful if you want to know whether trying to do something is futile with regular expressions. For example, knowing that XML is non-regular is useful if the idea to parse XML with regex ever enters your mind. And if you don't know off the top of your head that XML is non-regular, the pumping lemma will let you prove it trivially.

And then there's compilers, where if you don't know this stuff, you're doomed. It just depends on the application.




回答2:


Here's Steve Yegge's take about the usefulness of compilers, summed up as:

In fact, Compiler Construction is, in my own humble and probably embarrassingly wrong opinion, the second most important CS class you can take in an undergraduate computer science program.

Grammars are essential to parsing recursive structures, which appear in programming languages, natural languages, and complex data structures. I believe some programmers do not meet them at all, but the persons who write compilers, IDEs, serialization etc. meet them a lot.




回答3:


As Yuval F pointed out, grammars are of critical importance to language parsing. If you take a look at parser generators, such as ANTLR, you'll find that the structure of grammars is surprisingly similar to what you've learned in school.



来源:https://stackoverflow.com/questions/461539/do-theoretical-computer-science-topics-have-real-world-development-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!