Skip to content

Meta-interpreters for dynamic dispatch with call/n #2618

Answered by bakaq
dnmfarrell asked this question in Q&A
Discussion options

You must be logged in to vote

What exactly are you doing in your meta-interpreter that needs the predicate to be public? Are you using clause/2 or something similar to get the body of a predicate to meta-interpret? I feel like just passing the source code as an argument may be a better idea.

But anyway, I think you can just special case call/n or (=..)/2 or any other predicate in your meta-interpreter so that you just trust it and don't need to introspect into it's definition.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@dnmfarrell
Comment options

@jjtolton
Comment options

@jjtolton
Comment options

@UWN
Comment options

@jjtolton
Comment options

Answer selected by dnmfarrell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants