[Haskell-cafe] Records
Cale Gibbard
cgibbard at gmail.com
Mon Nov 21 15:50:00 EST 2005
On 21/11/05, Henning Thielemann <lemming at henning-thielemann.de> wrote:
>
> On Sat, 19 Nov 2005, Antti-Juhani Kaijanaho wrote:
>
> > Ketil Malde wrote:
> > [about A.b and A . b potentially meaning different things:]
> >> Syntax that changes depending on spacing is my number
> >> one gripe with the Haskell syntax
>
> I also think that it is problematic that a character which can be part of
> an alpha-numeric identifier can also be part of an infix operator
> identifier. This is the cause of the relevance of the spacing. 'A+b' and
> 'A + b' always mean the same, but 'A.b' and 'A . b' do not. Very
> confusing.
This really isn't so bad in practice though. I've certainly never been
confused by it. You'd have to go out of your way to construct a
situation in which it's potentially confusing, which is something that
might be relevant in the IOHCC, but not in ordinary programming.
There are much more important issues to deal with than this, really.
In a sane language, small amounts of whitespace sensitivity are going
to be around no matter what you do. We use whitespace to denote
function application. I can't write fx to mean f x. This is a good
thing. The same perhaps ought to apply to operators. It would be nice
sometimes to be able to use '-' as a hyphen in the middle of names.
- Cale
More information about the Haskell-Cafe
mailing list