dglazkov / polymath

MIT License
133 stars 9 forks source link

Make Library a class #15

Open jkomoros opened 1 year ago

jkomoros commented 1 year ago

Currently it's a particularly-shaped data structure that is passed to a number of different functions.

That means the structure of the data has to be known by a number of different scripts, making it hard to change.

It also means that if we want to do something clever with the format, like allow chunks to reference a shared info_id, we need to teach everything that deals with chunks how to do that.

dglazkov commented 1 year ago

One thing to consider: since the data structure is roughly set, perhaps the class needs to be controller-style -- it takes library as argument and knows how to operate on it.

jkomoros commented 1 year ago