jackfirth / rebellion

A collection of core libraries for Racket
https://pkgs.racket-lang.org/package/rebellion
Apache License 2.0
82 stars 16 forks source link

Integrate Rebellion data types with lenses #356

Open samdphillips opened 4 years ago

samdphillips commented 4 years ago

This issue is specifically about data types in rebellion/base and rebellion/collection.

As a proof of concept (and I needed it for a project) I built some lenses for records and tables for review/discussion. For records (record-field-lens) there is enough access, but the interface is a little awkward. To make the table lenses (table-columns-lens, table-column-lens, table-value-lens) work I provided table constructor and accessors from a submodule only to the lens module.

jackfirth commented 4 years ago

I've wanted to redo the lens library completely for a few years now, as part of Rebellion. Maybe some modules like this:

...and possibly others. As a result, I'm a little wary of Rebellion depending on the current lens API. All that aside, tables and records definitely should expose more functionality so it's possible to make lenses from their public APIs.