Newshot

编程一门语言

Translation(model translation, not the source's own text)

编写一门语言

  • 这是该演讲的配套文章。
  • 本系列的完整代码可以在这里查看。

在过去几年里,我不得不为两家不同的公司实现两门(非常简单的)编程语言。我发现这段经历非常有趣,因此决定更深入地研究这个课题——因为没错,一个理性的人就是这么做的:只有在我把一个问题解决完(而且还是两次!)之后,我才会去研究一个人实际上应该怎么去做这件事。

而既然这是一个有趣的研究课题,我就开始在工作之余就此做一些非正式的现场编程分享。本系列将跟随这些分享展开,因为我发现这是准备它们的一种很好且很有动力的方式。

  • 引言
  • 表示源代码
  • 做出决策
  • 命名事物
  • 复用代码
  • 重复动作
  • 识别无效程序
  • 推断类型
  • 在 AST 中强制实施类型规则
  • 生成带类型的 AST
  • 解释带类型的 AST

Only about 364 characters could be extracted — the rest did not come through (common on sites that need scrolling or a login). Read the original for the full piece.

Published by Lobsters
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗