It all returns to nothing.

, 解释器



最近在看Crafting Interpreters,虽然只看到第一章,但是其中的一个note还是挺有意思的,所以在这里记录、翻译一下。


One of the hardest challenges in writing this book was coming up with a name for the language it implements. I went through pages of candidates before I found one that worked. As you’ll discover on the first day you start building your own language, naming is deviously hard. A good name satisfies a few criteria:

  1. It isn’t in use. You can run into all sorts of trouble, legal and social, if you inadvertently step on someone else’s name.

  2. It’s easy to pronounce. If things go well, hordes of people will be saying and writing your language’s name. Anything longer than a couple of syllables or a handful of letters will annoy them to no end.

  3. It’s distinct enough to search for. People will Google your language’s name to learn about it, so you want a word that’s rare enough that most results point to your docs. Though, with the amount of AI search engines are packing today, that’s less of an issue. Still, you won’t be doing your users any favors if you name your language “for”.

  4. It doesn’t have negative connotations across a number of cultures. This is hard to be on guard for, but it’s worth considering. The designer of Nimrod ended up renaming his language to “Nim” because too many people remember that Bugs Bunny used “Nimrod” as an insult. (Bugs was using it ironically.)

If your potential name makes it through that gauntlet, keep it. Don’t get hung up on trying to find an appellation that captures the quintessence of your language. If the names of the world’s other successful languages teach us anything, it’s that the name doesn’t matter much. All you need is a reasonably unique token.



  1. 没有被使用过。 如果你不小心与别人的名字重名了,那么就会遇到诸如法律问题、社会问题等的各种麻烦。

  2. 发音容易。 如果一切顺利,那么大家将可能念出以及写下你的语言的名字,任何长于几个音节或者比几个字母长的东西都会使大家厌烦的。

  3. 足够独特,易于搜索。大家会通过搜索引擎搜索你的语言名称来了解它,所以你需要一个足够罕见的词,那么大多数的结果都会指向你的文档了。不过随着目前人工智能搜索引擎数量的增加,这已经不是什么问题了。尽管如此,如果你把你的语言命名为“for”,这是不会给你的用户带来好处的。

  4. 在许多文化中没有负面意义。,这是很难提防的,但是也是值得考虑的。Nimrod的设计师最终把他的语言重命名为”Nim”,因为大多数人及的Bugs Bunny使用“Nimrod”作为侮辱。




您的电子邮箱地址不会被公开。 必填项已用*标注