[ghc-steering-committee] Record dot syntax: vote results
Joachim Breitner
mail at joachim-breitner.de
Tue Mar 31 09:45:50 UTC 2020
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
Cheers,
Joachim
--
Joachim Breitner
mail at joachim-breitner.de
http://www.joachim-breitner.de/
More information about the ghc-steering-committee
mailing list