[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SYNTAX ONLY: renaming
Date: 31 May 91 19:56
From: haskell-request@cs.glasgow.ac.uk
Sender: Joe Fasel <jhf@c3serve.c3.lanl.gov>
To: haskell <haskell%cs.yale.edu@yalevm.ycc.yale.edu>
Subject: Re: SYNTAX ONLY: renaming
Original-Via: uk.ac.nsf; Fri, 31 May 91 19:54:26 BST
Original-Sender: jhf%gov.lanl.c3.c3serve%edu.yale.ycc.yalevm%edu.yale.cs@yale.edu
| From: Philip Wadler <wadler@cs.glasgow.ac.uk>
| My one strong feeling is that the meaning of . should not
| depend on spaces. (x+y) and (x + y) mean the same thing, so we
| don't want (x.y) and (x . y) to mean different things.
I agree. Will's example
f'a' f' a' f 'a'
is not quite analogous, because ' is not being used in an infix manner
in any of these constructions. On the other hand, (Foo.f) and (Foo . f)
seem to have the same syntactic structure, and the idea that one is
function f from module Foo while the other is constructor Foo composed
with f is horrifying.
| Virtually everywhere, the concrete syntax of renaming is a dot.
| So I think we should stick with Module.name. This has the advantage
| that it makes it easy to extend Haskell with records.
| I tentatively suggest (f 'o' g) for composition.
You mean f `o` g, I think. I don't think I can live with this.
Function composition is much too important to have such an awkward
syntax.
| Alternatively, use, say, Module$name for renaming,
| and (f . g) for composition.
I can live with this, although when Brian pointed out to me that
this has a VMS flavour, it gave me pause. :-)
--Joe