Skip to content

Comment on Boomerang: A bidirectional programming language for ad-hoc dataparent

Comments

Not quite. A lens comprises three operations:

  get : C -> A
  put : A x C -> C
  create : A -> C
And the GetPut, PutGet, CreateGet laws require of every lens that:
  put (get c) c = c
  get (put a c) = a
  get (create a) = a
In other words, if there are no edits, then it is a round trip. The real inequality you mean is bidirectional != bijective.

(EDIT: for typesetting equations.)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.