If Curry wants to stay compatible with Haskell, there is a problem
with Curry's constraint syntax and Haskell's labeled updates:
data T1 = C1 Constraint
data T2 = C2 { x :: Int }
foo y = C1 { x = y } -- this is a constraint
bar y = C2 { x = y } -- this is a labeled update
IMHO, it's rather inelegant if parsing depends on type information:
* It makes an implementation more un-modular.
* It's hard to read for humans. Imagine T1 and T2 being declared in
modules different from the one where foo and bar are defined.
Without having the modules at hand or doing some type inference
for herself, the user can't decide which way to parse foo/bar.
To solve this problem, one has to use a different kind of parentheses.
Propostion: #{ ... } # is an ASCsymbol and therefore a symbol in
Haskell, but at the moment I don't think that # and { can follow each
other in a legal Haskell program without intervening space.
Hmmm, this is mail ranked between "1" and "2" following
WADLER'S LAW OF LANGUAGE DESIGN (19 Dec 96 :-).
Some Comments anyway?
--
Sven Panne Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen Oettingenstr. 67
mailto:sven.panne_at_informatik.uni-muenchen.de D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne
Received on Mo Feb 09 1998 - 10:07:00 CET