Hello,

Théophane Hufschmitt <rg_ni...@regnat.ovh> skribis:

> Wed 29 Mar 17 − 17:25, Mateusz Kowalczyk(fuuze...@fuuzetsu.co.uk) a écrit:
>> I'm sure you've answered this ad nauseum before but I wonder how you're
>> going to type sets? They are bread-and-butter in nixpkgs. Presumably
>> they will be typed on their fields with the standard subtyping, like
>> anonymous records.
>
> I didn't talk about records, because they are a quite difficult topic,
> and I don't exactly know what their typing will look like in the end.

The problem is that attribute sets are often used like records, but they
are not records at all.  Rather, they’re roughly hash tables where the
key is a string/symbol.

In Guix we use actual records where needed so that we can verify basic
properties at compilation time, such as field names.  Record types are
disjoint from one another, which allows at least for run-time type
checking.

Ludo’.

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to