News for hackers. Stuff that matters.
Re:Haskell RecordDotSyntax language extension proposal (Acce... by runeks on Monday September 21, 2020 @12:32PM (#24545362)
> So maybe it should have been something like "->".

The problem is that "->" has an even more special meaning than "." in Haskell, since "->" separates the arguments of an unnamed function from its definition.

So, for example

    addOne = \x -> x + 1
and

    addOne x = x + 1
are equivalent.

This means that "->" is about as special as "=". Which leads me to think it would require some very substantial changes to the parser, and perhaps even defeat the purpose of increased readability. For example, how readable is the following?

    getY = \x -> x -> y
(which reads as "getY = \x -> x.y" in the current proposal)

There are no comments on this comment yet.