[ghc-steering-committee] Record dot syntax: vote results

Alejandro Serrano Mena trupill at gmail.com
Tue Mar 31 09:49:12 UTC 2020


El mar., 31 mar. 2020 11:46, Joachim Breitner <mail at joachim-breitner.de>
escribió:

> Hi,
>
> Am Montag, den 30.03.2020, 21:27 +0200 schrieb Alejandro Serrano Mena:
> > for me the syntax "r .x", with a space in between the element and the
> > field name, looks completely alien and different from what other
> > languages do [1,2,3].
> > Furthermore, several examples in C4 are very surprising to me. For
> > example, "f r .x" meaning "f (r.x)".
>
> you list Ocaml here, but that C4 is _precisely_ what Ocaml does (and in
> my earlier list of options, where I tired to be more systematic about
> option names, i was called “Ocaml”):
>
>    utop # type r = { x : int };;
>    type r = { x : int; }
>    utop # let r = { x = 0 };;
>    val r : r = {x = 0}
>    utop # let f : int -> int = fun n -> n;;
>    val f : int -> int = <fun>
>    utop # f r .x;;
>    - : int = 0


Interesting. I must have misread the spec. So I guess now I find Ocaml
surprising too!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20200331/926969f9/attachment.html>


More information about the ghc-steering-committee mailing list