Re: Curry report updated

From: Michael Hanus <hanus_at_informatik.rwth-aachen.de>
Date: Mon, 23 Nov 1998 15:28:19 +0100

Sven Panne wrote:
> OK, that's convincing. But the question remains if "success" should
> be a keyword or a normal identifier which is bound e.g. by the prelude.
> That raises another question: What exactly are the keywords of Curry?
> "pragma" or "data" is obviously two of them, but what about e.g.
> "flex" or "choice"? Haskell has the slightly obscure concept of
> specialids ("as","qualified","hiding"), but IMHO this not very nice.
> Consequently, I opt for making everything like "flex" a keyword, too.

Good point, I'll add the list of keywords to the next update
of the report. Personally, I think that all terminal symbols
mentioned in the context free syntax (like module, data, flex,
where etc, cf. Appendix C.3) should be keywords to avoid
confusion. In this sense, the symbols introduced in the
prelude (like =:= or "success") but not explicitly mentioned
in the grammar are not keywords. But note that the module
system requires that the identifiers must be prefixed if
a name conflict occurs, i.e., if you define a function
"success" in your program, you can only access the standard
function by "prelude.success". Thus, redefining standard
names might not be a good idea.

> > In principle, I agree. On the other hand, I think that a
> > machine-usable grammar is sometimes less readable for humans.
>
> Just because of that fact, the Java-people made a nice compromise:
> Within the report itself, fragments of the grammar are presented in
> an ambiguous, but human-readable form. The grammar chapter itself
> starts by describing the problems/conflicts of the grammar given so far
> and the needed incremental changes to the grammar given later, finally
> reaching an LALR(1) grammar.

This sounds reasonable. Currently, I'd like to defer it but
if there is some volunteer who wants to do it soon I could support
him/her with the existing material.

Best regards,

Michael
Received on Mo Nov 23 1998 - 15:32:00 CET

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