|
|
|
|
|
by vortico
2934 days ago
|
|
Most things here are reasonable, but I don't see a point about having only one struct. If your state is better organized in lots of hierarchical structs, within lists, within other structs, your data will be easier to move around, copy, and zero in smaller chunks, and you can write functions which processes isolated segments of data rather than a huge global state. |
|
The interface of the library is intended to help the user of the library, not the developer of the library.
The simplest interface is the best for the user, who does not want to know anything about the implementation details.
In the ideal case, the developer and the api designer will be different persons who are not in good terms to each other. The more the developer hates the api designer, the better.