Prolog inline predicates

The idea of introducing the inline/2 directive to fix usage of goal_expansion/2 feels too much like a bandaid to allow keeping the term-expansion mechanism as-is (recognizing here that breaking backwards compatibility should not be taken lightly).

The Logtalk compiler also does some inlining of predicate calls (Performance — The Logtalk Handbook v3.72.0 documentation) but it’s more akin to what’s described in your first link to ECLipSe than the inline/2 directive described in the second link. That said, the semantics of Logtalk’s term-expansion mechanism makes the idea of inline/2 mostly redundant given goal_expansion/2. As I mentioned in past discussion on the term-expansion mechanism, those semantics are implementable in SWI-Prolog without breaking current applications.