英文:
What are the 5 secret keywords in Go?
问题
在这个演讲中,Francesc Campoy展示了Go语言的25个关键字,其中有5个“秘密”关键字。
Go语言的5个秘密关键字是什么?
英文:
In this talk, Francesc Campoy has a slide with Go's 25 keywords, and apparently 5 'secret' keywords.
What are the 5 secret keywords in Go?
答案1
得分: 16
以下5个关键词被忽略:
尽管
事实
尽管有所有的反对意见
鉴于
在这个程度上
更新:正如Deleplace在评论中指出的那样,这些彩蛋关键词已被移除。在一个重大的解析器更新期间,看起来是通过这个提交将它们移除的。如果你尝试运行包含这些标记之一的程序,你会发现它们现在被视为普通的标识符。
英文:
The following 5 keywords are ignored:
notwithstanding
thetruthofthematter
despiteallobjections
whereas
insofaras
Update: As Deleplace notes in the comments, the easter egg keywords have been removed. It looks like this commit took them out during a major parser update. If you try to run a program containing one of these tokens, you'll find they're treated as ordinary identifiers now.
答案2
得分: 8
词法分析器(lex.go)中存在一些复活节彩蛋关键词,这些关键词在官方文档中没有提到,因此编译器会忽略它们。
以下是这些关键词:
notwithstanding
thetruthofthematter
despiteallobjections
whereas
insofaras
你可以参考这个对话了解更多细节。
英文:
There are some easter egg keywords in the lexer (lex.go) that are not in the official documentation, and hence are ignored by the compiler.
Here they are:
notwithstanding
thetruthofthematter
despiteallobjections
whereas
insofaras
You can report to this conversation for more details.
答案3
得分: 3
看起来秘密关键字将在v1.10中被移除。请参见这里。
对于任何好奇的人,这里是引入这些关键字的提交。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论