EXPORTHOW 和 DECLARE - 它们是什么?

EXPORTHOW and DECLARE - what are they?

我读过 Jonathan Worthington 写的 article 关于元编程的文章。 他在那里写道:

Do do this, we stick it in the EXPORTHOW module, under the name “class”. The importer pays special attention to this module, if it exists.

同时 here Jonathan 使用 DECLARE。 有没有关于那个和其他类似事情的文件?什么时候应该使用什么?进口商寻找的其他特殊物品是什么?

我试图搜索官方文档,但没有找到任何东西。

提前致谢!

where can we at least look at all possible things like that?

Aiui Rakudo compiler 的源代码和你想要的一样好。

在我看来 EXPORTHOWprocessed here, with DECLARE in particular here,作为 World.nqp 的一部分。

Afaik World class 是:

  • Rakudo 的内部实现特定细节。它不是乐语的一部分。这不是您可以依赖的东西。官方不支持。

  • 用nqp写的。 nqp 不是 Raku。它本质上是 Raku 的一小部分,专注于成为编写编译器的良好编程语言。