Proposal: Dot as Postfix Function Apply

Jules Bean jules at jellybean.co.uk
Thu Nov 5 08:21:14 UTC 2015


-1 from me.

In particular reference to the comment below:

On 4 Nov 2015, at 14:16, Dominique Devriese <dominique.devriese at cs.kuleuven.be> wrote:

> The fact that it may conflict
> with previous, less natural syntax choices (lens composition with .
> comes to mind) should not be counted against an opt-in extension.


Lens composition with (.) is not really a syntax choice - Lens composition with (.) is simply function composition with (.) which is a fairly deeply-set Haskell choice. I can see arguments against using (.) for function composition but I don’t think anyone would seriously consider changing that now: and Lens composition will always have the same syntax as function composition.

It just so happens that Lens composition with (.) gives us the ability to write person^.job.title which is one of those nice coincidences which looks a bit like C-style object dereference.

Jules





More information about the Libraries mailing list