One key limitation I keep running against is the fixed syntactic argument structure of predicates.
This is in particular the case when establishing a layered architecture and deeper call structures.
Suddenly, I notice I need some information at the very bottom, which needs adding an argument across many predicates / calls – leading to massive change of predicate interfaces.
O’Keefe has a solution, a context argument structure that hides the arguments in one bound variables with “setter” and “accessor” predicates.
He also shows in his book how the overhead can be eliminated using macros (p.314, in the Crafts book) – which i never fully understood – the presentation is very terse.
I am thinking that my pain here is likely prevalent (pervasive?) – wouldn’t it be nice to have a built in capability for variable / extensible / named arguments of predicates with zero costs achieved with macro preprocessing.
There would be two kinds of code:
Code with the usual variables and bindings.
Code that include as variable a structure which is expanded by the preprocessor (or compiler) and thereby hides, takes care of the argument structure expansion, without the need to refactor lots of code.
all comments are much appreciated,