Re: Confused Students

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Fri, 22 Jun 2007 09:57:12 +0200

Sergio Antoy wrote:
> The confusion stems from various sources. We use of the same equal
> sign for two rather different concepts (rewriting and naming).
> And we use the same word "variable" for two rather different
> concepts (a place holder for any term in a rewrite rule, and the
> name of a subterm in a term).
>
> If we change the notation and terminology, there is no confusion.
> If we overload notation and terminology, and explain it to the
> students, there is no confusion as well. One could only argue
> whether this overloading is appropriate and convenient.

I think this is a really good explanation of the situation.

In the very first proposal for Curry, there was a clear syntactic
distinction between functions and variables. After some
discussion, there was an agreement to be as close as possible
to the syntax of Haskell which had the consequence that
this distinction become more or less invisible, i.e., not supported
by local syntactic conventions (e.g., uppercase/lowercase, keywords).
With the poor possibilities of ASCII, it is difficult to find good
conventions without writing more code (like introducing "func" or
"var" keywords). In a non-ASCII-world, different fonts or colors
might a good choice. For instance, the currydoc documentation tool
generates HTML representation of Curry programs where different colors
and/or fonts are used for the different syntactic elements. Thus, the
"x" in

pair = (x,x)
x = True ? False

would look different from the "x" in

pair = (x,x)
  where
   x = True ? False

making the difference obvious.

Best regards,

Michael
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Fr Jun 22 2007 - 10:04:37 CEST

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:09 CEST