Re: Curry module system

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Mon, 20 Feb 2006 14:25:57 +0100

Frank Huch wrote:
> I agree. Such a function should be named free_ instead of x_.

Yes, this is a good alternative. Personally, I'd prefer the name "any"
for this purpose, but unfortunately it is already reserved in the prelude.

> What I do not like is the difference between:
> main = let free_ free in (free_,free_)
>
> and
> free_ = let x free in x
> main = (free_,free_)
>
> having local constants but only global functions will be confusing for
> programmers. However, this is a general problem of Curry's design.

I'd say it is only confusing because of the desire to be compatible
to the syntax of Haskell. Many other languages (e.g., Scheme, Java)
make a syntactic distinction between variables/constants and
functions/procedures so that the difference is obvious from
the program text. In Curry this difference could be shown
(similarly to the difference between between constructors and
functions) by some colorization of the program.

Regards,

Michael

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mo Feb 20 2006 - 14:41:40 CET

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:07 CET