>> One major difference is the type system, which feels more like Haskell than
Prolog (where everything is an atom).
Everything in Prolog is a "term", that can be a predicate, a constant or a
variable. Constants are predicate symbols (called "functors"), numbers, or
character strings of the form [a-z][A-Za-z0-9_]& (where & is the Kleene star that I don't know how to enter in HN comments), or any string enclosed in
single quotes, ''. Variables are upper case letters. And predicates are atoms
followed by a vector of terms in parentheses, their arguments.
There is often confusion on the matter, because all constants are considered
"atomic" and people sometimes use the term "atom" to refer to all atomic
constants (where the distinction is clear from the context; allegedly).
However, numbers are not atoms, so the following is true:
?- atomic(1).
true.
While the following, false:
?- atom(1).
false.
There is even more confusion sown by the different use of first-order logic
terminology in Prolog. For example, in FOL, a "term" is a constant, a variable
or a function given as an argument of a predicate, while an "atom" is a
predicate symbol followed by a vector of arguments in parentheses. Perhaps the
difference is partly due to the fact that it is
ground atoms (i.e. without
any variables) that are the most often discussed in FOL, and since constants
are ground, they end up being called "atoms" in Prolog.
Then there's the fact that, in Prolog, it's impossible to distinguish between
a constant and a predicate symbol or, indeed, between predicates with 0
arguments and constants. Perhaps as a result of this, Prolog accepts
predicates as arguments to predicates - since it can't distinguish between
0-arity predicates and constants, it has to accept predicates as arguments,
but then, it has to accept n-arity predicates as arguments. Which means that,
in principle, it's a FOL language, but in practice, it is actually
second-order. Maybe then the reason why predicates are known as "terms" in
Prolog is because they can, actually, take the place of terms. But, I don't
know for sure.
Anyway, there's a lot of terminlogical confusion around Prolog :)