Hi Jan,
Have you considered inlining C – with “macro” wrappers to access terms … as an alternative to foreign predicates.
Perhaps now with a new construct for determinstic predicates, it could, in particular make sense – to focus on seamlessly supporting simpler C code that doesn’t need to be backtracked over.
Key benefit would be fast deterministic (functional) code; simplified, and seamless, foreign language support.
Drawback might be the difficulty of supporting a debugger that handles two languages seamlessly and a more elaborate prolog complier tool chain that now requires calling a c complier as well.
Dan