Re: Curry

From: Manuel Chakravarty <chak_at_cs.tu-berlin.de>
Date: Wed, 18 Dec 1996 12:13:19 +0100 (MET)

> Simon Peyton Jones writes:
>
> [...]
>
> > The current Curry design differs form Haskell in many places
> > where it could be identical. I think that represents a big missed
> > opportunity.
>
> In fact, we were already trying to keep close to Haskell,
> and only to deviate at crucial points (like e.g. logic
> variables, evaluation patterns, ...). Maybe we were not
> consequent enough.

Sorry Herbert, but I don't think that the current proposal honestly
tries to keep close to Haskell. It deviates in *many* annoying little,
*unnecessary* details, and that is -- as far as I understand --
Simon's critic. Just to give some examples:

  * Why use `datatype' instead of `data' as a keyword. This is picky,
    but that is the point!

  * Why use `:' to annotate types and `:=' for equations. This seems
    picky, but it is not. Haskell allows type annotations in
    expressions (which is very important to resolve type ambiguities)
    and `:' would clash here with the infix list constructor.

  * Why use lower case data constructors? The use of upper and lower
    case letters in Haskell carries semantic meaning, because
    constants are written in upper case and variables in lower
    case. You may think that you want to reserve upper case variables
    for ex. quant. variables, but you can introduce them by other
    syntactic means (see Escher, for example).

  * Or the use of `[a|b]' as an alternative list syntax. This
    conflicts with list comprehensions.

    (Don't try to find a compromise between Haskell and Prolog. Choose
    one, and stick to it.)

I think to remember that I already argued for a Haskell-like syntax at
our meeting in Dagstuhl; I don't think that my arguments have been
seriously considered so far.

A last remark: I would even step back from some additional features,
just to keep as close as possible to Haskell. As Simon said, the ideal
solution would be a mere extension of Haskell without any change to
the base language. Think about it!

Cheers,

Manuel
Received on Mi Dez 18 1996 - 15:56:13 CET

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