Hacker News new | ask | show | jobs
by tonyg 499 days ago
No, a record is a tagged (sequence of) value(s).

  <tag v1 v2 v3>
If you put a single dictionary-valued "field" in a record, you get a variation with named fields

  <tag {
    field1: value1
    field2: value2
    field3: value3
  }>
Records have positional "fields" because of the Scheme heritage of the design.

--

Re bytestring -- yes there are some concessions to real machines/languages in there that aren't absolutely required. Other examples include booleans and strings, which could have been <true> and <false> and <string [65 66 67]> etc respectively.

There's a little more on this topic in footnote 2 on the "conventions" page: https://preserves.dev/conventions.html#fn:why-dictionaries

1 comments

Looks like a lot of excellent work!

Are there any good examples of nontrivial schemas etc?

Thanks. Yes there are: see sections 15, 16 and 17 of https://synit.org/book/, where Preserves, Preserves Schemas, and the Syndicated Actor Model make a reactive replacement system layer for linux (essentially an alternative to systemd)