他们用什么语言构建其他语言? [英] What language do they build other languages with?

查看:150
本文介绍了他们用什么语言构建其他语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用哪种语言来构建C ++和java等低级语言?



如何使用无语言构建第一语言?

解决方案

在编译器的上下文中,此操作通常称为 bootstrapping 。具体来说,请参阅鸡和蛋问题部分,直接回答您的问题。



用汇编语言编写。如果你的下一个问题是第一个汇编语言怎么写?那么答案应该是第一个汇编程序是用二进制机器码手工编写的,可能还有前面板切换开关 。这无疑是对真正发生的事情的简化,但概念是一样的。



还有一篇很好的文章标题为关于信任信任的反思 Ken Thompson谈到使用编译器来构建该语言的编译器的风险。 / p>

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

How could you build the first language with no language?

解决方案

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.

这篇关于他们用什么语言构建其他语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆