On the overall i don' think anyone will disagree that the code is poorly designed, regarding all the OO, all the way the thing is made, it's very monolithic, against all good practice you would find in programming school book, and very hard to extend or encapsulate, and the rpc interface can only do that much, and is not that easy to really use from the perspective of making more complex web app/Dapp.
But in the same time, once you integrate all the game theory and math model for speculation and all this, it's easier to see where the code make more sense, and which base variable are actually more carefully designed in their definition and access, and where the care is put on, and it's not especially on the efficiency as a distributed ledger to solve double spend, or having easily distributed application wallet/shops/explorer "out of the box".
That's mainly my point here.
You illustrate the clumsiness of the coding (I never looked at the code itself in much detail) ; I was pointing out the clumsiness in the cryptography and in certain other technical mathematical aspects. I used this as an argument to point out that who-ever made that design, was not a *mathematical genius*.
Now, I see your point, in that the evil creator of bitcoin didn't CARE about that, because that was not what was important, even though he advertised it in a misleading way, to be important. My point was simply that a mathematical genius wouldn't even make some of those "mistakes" by neglect, like I would guess that an experienced C++ programmer wouldn't make certain clumsy constructions I think you are referring to, even by neglect. If you are proficient in a domain, you don't screw it up, even if you're being casual. If you know that you can never have 2^100 transactions on the block chain, you don't refer to them with a 256 bit hash. Not even "by neglect".
So my idea was that this kind of crypto, and that kind of math, was actually DIFFICULT for the creator of bitcoin.
As to bitcoin being essentially optimized ON PURPOSE for being speculative by PoW, I don't think so. I think it was simply because it was the idea of hashcash
https://en.wikipedia.org/wiki/Hashcash .
Again, I don't put on the back of a conspiring evil genius what can be explained by "ignorance". Everything is relative. Also, the speculative aspect of collectibles is well-known, it is one of the problems with non-inflationary payment systems, and why famous works of art are such speculative items.
Of course, I cannot exclude that Satoshi was an evil sloppy genius. I tend to think that he was not a math genius, was not an experienced cryptographer, and if I read your (and many other) observations, he was not a high-level C++ programmer either ; I have a hard time thinking that this was "on purpose sloppy" or even worse, that this was in fact pure genius of which we, with our limited brains, could not even fathom the scope of it.
I'm simply using Occam's razor.
So, bitcoin is what it is. It has now a life of its own. And, as most of the things that happen in life, the reason for this is just a coincidence of many aspects, and has not entirely been planned that way. Nothing ever is.
Reality is much more complex than all men's plans.