Is it beneficial for a programmer to learn how to build a compiler?

前端 未结 17 1160
难免孤独
难免孤独 2021-02-07 01:10

There is a lot of variety when it comes to the different types of programmers. In general, is beneficial for a programmer to learn how to build a compiler? In what cases would

17条回答
  •  一生所求
    2021-02-07 02:09

    Compiler programming is an interesting topic and there is some great value to it. At the college I went to it was an elective, Language Design and Implementation. I'm personally grateful to have taken it. We learned the various ways to implement lexers, parsers, and bytecode emitters.

    The real value that I've seen is that it illuminated the black box that I depend on to get my program up and running. It gave me a better insight into how the compiler works, and helped me better understand compiler errors.

    The process of compiling source into code is actually in a general way what most programs do, take some input, perform some process, and output the result. A compiler has some very well-defined ideas on how this should best be done.

    I think in all it was beneficial to me, and currently I work on Java based web apps.

提交回复
热议问题