Looking at the PCE library and its evolution, I reach what looks like inconsistencies in examples and the documentation, even mentionned in the manual.
For example: send(W, return, Typed) and on the next predicate send(W, return(@nil))
The logic should be to have send(W, return(Typed)) too, if the rule is now based on send/2 and get/3
Though the principal predicates for invoking behaviour are send/2 and get/3, XPCE provides an alternative using send/[2-12] and get/[3-13]. The following goals are all identical.
send(Box, width(100))
send(Box, width, 100)
get(Point, distance(point(10,10), D)
get(Point, distance, point(10,1), D)
This alternative is provided for compatibility to pre-5.0 versions as well as to support users that dislike the new-style send/2 and get/3. It is realised using goal_expansion/2 and thus poses only a small compile-time overhead.
That’s the criteria I use, since both are supported and I care about the readability of the code some years later, but from the history of the development of the API the new version is send/2.
Since goal_expansion/2 is used to provide send/[2-12] you may have some special situation in which you want to reduce compilation time, in which case send/2 would be better.