libera/#sicl - IRC Chatlog
Search
10:58:48
mfiano
I'm just thinking about my protocol redesign. There are some modules that have both an "internal" and "external" protocol. The former is a superset of the latter intended to be consumed by other modules internal to the codebase, while the latter is the outer/user API. I go back and forth on this or just using un-exported symbols for the internal code. The reason why, is it becomes confusing for the
10:58:50
mfiano
user, and must be documented that one package is not to be used. I'm curious what you think about this.
11:20:12
jackdaniel
mfiano: after some times I've found the most natural and flexible the following arrangament: there are two package: foo and foo-internals; the application is fully implemented in the latter
11:20:35
jackdaniel
foo-internals USEs foo, and deciding what is an external protocol is just a matter of changing what foo exports
11:21:15
jackdaniel
that way whole implementation has access to itself without infridging another package internal symbols
11:21:39
mfiano
That is essentially what I was referring to what I do above, except I never USE, instead using PLN.
11:23:22
jackdaniel
because when you decide that some other symbol should be moved to the "external" interface, then you'd need to change the code in internals to add the "short" package prefix