Re: New PAKCS release (Version 1.8.0)

From: Bernd Brassel <>
Date: Tue, 03 Apr 2007 10:10:44 +0200

Wolfgang Lux wrote:
> Incidentally, what about other (abstract) types representing entities
> not defined by the user, e.g., file handless, port numbers, etc. Do
> you dislike them as well because they cannot be used in a logical way?

What I dislike about them is that you get run-time errors if you try to
use them in a logical way. As there are no type classes or equivalent
method in Curry, nothing in the type system prevents you from creating
(unknown::FileHandle). And if we had a possibility to express a type
constraint, e.g., (unknown :: Narrowable a => a) would you still insist
on making (=:=) work on file handles?

>> I would much prefer a standard Int which is fully narrowable and maybe
>> provide the primitive type in a library if anyone really needs it.
>> But I
>> would not care nuch if that primitive type is not in the supposed
>> class
>> of types for which (=:=) is defined.
> I would care. Agreed that the ways how you can use values of primitives
> types in a logical way are limited. But why restrict them further? This
> looks like throwing out the baby with the bathwater.

This notion you cite means that we loose a very good thing just because
we want to get rid of another very unimportant thing. So what could be
the "very good thing" in this case? It must be the restricted use of
logical primitives like (=:=) and unknown on primitive types. This "very
good" seems to be very arguable to me. What is the "very unimportant
thing" we could get rid of? Suspension also known as "run-time error"
thereby reestablishing the completeness of the logical search which was
lost to flaundering. Does not seem like a "baby-case" to me at all.

>> So why put it into the basic definition
>> of the
>> language, as long as simpler approaches might work just as well (or
>> better)?
> Because the simpler approach does work only for algebraic data
> types and not for other types?

Therefore it really works in contrast to "working only if the order of
evaluation is favourable".

curry mailing list
Received on Mi Apr 11 2007 - 11:56:47 CEST

This archive was generated by hypermail 2.3.0 : So Sep 20 2020 - 07:15:03 CEST