@Richy_T
I appreciate your argument, but i feel compelled to continue to argue my view.
you are holding your coders to unattainable levels of correctness.
not really, the spec is in the wording of the functions classes and methods
example:
class TX, has method isVaild() which looks like
{
isSigValid()
isCRCValid()
isInputsSpendable()
isOutputOK()
}
in this case i dont know if there's any bugs, but i do know the spec... for a TX to be valid it has to have a valid sig, crc, valid inputs... etc
IMO, more often than not there's WAY more bugs in the spec itself then the code.
a spec is good for a relatively high level view of the system as a whole, and maybe some detail here and there. somthing you draw up and give careful thought to, at the very beginning. once its rotted away and no longer reflects the reality of the code, maybe you go fix it up just so you have that high level view which is useful to pull out when you want to make a major change a year later.
Sorry, but that is simply correct if and only if there will only ever be one single implementation of the protocol. In any instance where interoperability is a concern, the proper approach is to define the protocol independent of any particular code implementation. Which is the reason why nearly every significant protocol is governed by a standalone document.
good point.
but really no one should be arguing that taking time to write clean code is not worth it.
truth is a reference client's implementation details WILL be heavily relied upon, by other programmers, spec or no spec.
and clean code WILL avoid bugs, and make future dev easier.
i dont believe for a second someone could make a spec which leaves 0 ambiguity, and if they mange to pull it of, a year later that same spec would be pretty rotted.
This may be impractical because as others mentioned, things are moving, forking, etc. - very dynamic right now. But there's a lot that isn't changing, and that could be properly spec'd.
this is as far as i'd take it:
Code:
bitcoin spec 2017:
max 21million coins
coins are divisible up to 8 decimals**
**this spec might soon be deprecated
LMAO, i joke...