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

前端 未结 17 1135
难免孤独
难免孤独 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 01:54

    I've up-voted most of these answers.

    I think compiler work gives you important ways of thinking about programming in general.

    Whenever you write any program you are, in a sense, defining a language, and every program is, at some level, a language processor.

    It makes you think about the best way to represent information, and understand that information can be encoded many different ways, not just as data structure and lots of classes.

    Once you know that every problem has multiple valid solutions, with pros and cons, you can usually choose a much better solution than with the old data-centered one-size-fits-all paradigm.

提交回复
热议问题