Reputation: 1490
I have read an article by Jonathan Worthington about meta programming. There he writes:
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.
At he same time here Jonathan uses DECLARE
.
Is there any documentation about that and other similar things? What and when should one use? What are other special things importer looks for?
I tried to search the official docs but failed to find anything there.
Thank you in advance!
Upvotes: 8
Views: 129
Reputation: 32489
where can we at least look at all possible things like that?
Aiui the source code of the Rakudo compiler is as good as you're gonna get.
It looks to me like EXPORTHOW
is processed here, with DECLARE
in particular here, as part of World.nqp
.
Afaik the World
class is:
An internal implementation specific detail of Rakudo. It is not part of the Raku language. It is not something you can rely on. It is not officially supported.
Written in nqp. nqp is not Raku. It's essentially a small subset of Raku focused on being a good programming language for writing compilers.
Upvotes: 4