in reply to Modules exporting functions and objects at the same time.
This is a question, rather than an answer or insight, so SoPW makes sense.
I would say; write the guts of the module however it makes the most sense based on the nature of the problem at hand and the skill of the coder.
One big catch is that if your user makes multiple instances of your object, then the underlying functions need to take care to ensure they are able to handle the different object contexts being thrown around. In general, I would expect it to be easier to start with objects on the bottom, and then add a functional interface which uses a sort of "default" package-scoped object internally.
|
|---|