|
|
|
|
|
by derdi
501 days ago
|
|
> Any syntactically valid construct in (ISO-conforming) Prolog is "first class" First class data, yes. First class predicate, no. > Predicates (and only predicates) can be called with `call/N` Some class of things that you apparently refuse to call "predicates" can also be called, but without having to use call/N. > Perhaps you mean, [...] No. I mean there are first-class callable things and second-class callable things, and second-class things are not first class. |
|
However, this is a charitable interpretation that is open to abuse if desired.
It is starting to sound like the criticism is that Prolog is not an object oriented programming language and does not pass contextual object information along with symbols in the same way SICP-style higher order functions are treated in functional programming languages.
This is by design, Prolog is a logic language that describes relationships, not a procedural language.
There is no behavioral difference that distinguishes a Prolog predicate as not "first class". There are many metapredicates designed to accept predicates as arguments, such as maplist/N. This is the primary criteria for supporting first class "callables" (another word poorly suited for Prolog, but I'm admitting it for purposes of conversation) in other languages. I would have assumed that would be a sufficient behavioral affordance.
> there are first-class callable things and second-class callable things
To make this more concrete, please provide some examples of "first-class" and "second-class" "callable things" in Prolog, as well as an example of "first class" and "second class" "callable things" in another language.
Given your level of confidence in your argument, I assume this should be fairly easy to do. Then we might have a concrete basis for discussion.