Re: Who needs types if we have terms?
- From: Torkel Franzen <torkel@xxxxxxxxxx>
- Date: 25 May 2005 09:42:47 +0200
"tmp123" <tmp123@xxxxxxxxx> writes:
> Or, in other words, is a term a data type?. They are usually used like
> data types?
> Because I've read a lot of post about prolog typed/untyped, but I'm
> wondering me if the only diference is in type (term) checking.
"Data type" can mean a lot of things, and you could describe the set
of terms with a given main functor as a data type. That Prolog is
untyped means that predicates (with a few exceptions) can be applied
to any terms. Thus for example append/3, although a predicate intended
to be used only with lists, can be called with any arguments, and
there is no checking, either at compile time or at runtime, of the
form of the arguments.
.
- References:
- Who needs types if we have terms?
- From: tmp123
- Who needs types if we have terms?
- Prev by Date: Who needs types if we have terms?
- Next by Date: Re: Who needs types if we have terms?
- Previous by thread: Who needs types if we have terms?
- Next by thread: Re: Who needs types if we have terms?
- Index(es):
Relevant Pages
|
|