[erlang-questions] Deep data structures and lenses

Jesper Louis Andersen <>
Mon Sep 14 12:27:32 CEST 2015


On Sat, Sep 12, 2015 at 7:51 PM, Guilherme Andrade <> wrote:

> Partially inspired by jlouis' erl-lenses[1] and an old discussion on this
> mailing list[2], I've been sketching a library for easier manipulation
> (both data fetching and updating) of deep data structures (records inside
> records, keylists inside records, etc.)


Awesome idea :)

I think I'll lurk and see where you take this. Definitely it is one of the
things we need in Erlang, but we also slightly lack the syntax
expressiveness to make it really nice.

One thing I'd think about is to use maps as the canonical structure to
which you blit input. This allows you to "melt" any tree-like data
structure and then "cast" it in another format, eventually updating data
along the path.

There is a nice set of algebraic properties underneath, which amends
themselves to (stateless) quickchecking by the way.



-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150914/1b55aa78/attachment.html>


More information about the erlang-questions mailing list