What language do they build other languages with?

后端 未结 8 982
青春惊慌失措
青春惊慌失措 2021-01-31 09:31

What language is used to build low level languages like c++ and java?

How could you build the first language with no language?

8条回答
  •  孤街浪徒
    2021-01-31 10:19

    In the context of compilers, this operation is often called bootstrapping. In particular, see the "Chicken and egg problem" section for a direct answer to your question.

    The very first compiler would have been hand-written in assembly language. If your next question is "how was the first assembler written?" then the answer would be that the first assembler was hand-written in binary machine code, possibly with front panel toggle switches. This is undoubtedly a simplification of what really happened, but the concept is the same.

    There is also an excellent article titled Reflections on Trusting Trust by Ken Thompson about the risks of using a compiler for a language to build the compiler for that language.

提交回复
热议问题