3 ms·
The "developer interface" includes at least three different parts: the API calls, the calling sequence, and the validity of the results. That last part is bord
by dalke 14y ago
The "developer interface" includes at least three different parts: the API calls, the calling sequence, and the validity of the results.
That last part is borderline. Some wouldn't call it part of the interface, but I do, because if there are problems then interface users end up wrapping the interface with another interface to work around those problems.
I therefore argue that the "more elegant but buggier" internals don't have the same interface, even if the API calls look the same.
As to why it should be more elegant? There are at least four parts here . How does the developer, or any interface user, review the code to see if there is a complex bug inside? That is, your scenario about the bug in the elegant code also applies to the inelegant. And how easy is it to carry out extensions to the project in the old code base vs. the new, even if those new features aren't yet implemented?
Third, the type of person who strives for an elegant interface also probably strives for elegant internals. Fourth, there are people who don't like closed boxes, and want to understand some of the insides of a package before they use it. If the insides don't look good, then they might be adverse to using it.
A term for the negative aspects of this tendency to clean up internal code is called "gold plating." A positive term is "technical debt", as in the inelegant code incurs a debt which must be paid off in the future by cleaning up the code.