<ol>
<li><p>As far as I know, Satoshi never gave a definitive answer on why C++ was chosen, so we can only speculate. There are existing questions on this site about that question, e.g. <a href="https://bitcoin.stackexchange.com/q/48414/208">Why is bitcoin written in C++?</a></p>
</li>
<li><p>Quality comes in many forms. I think it's fair to say that the original Bitcoin codebase, as published by Satoshi, was <em>remarkably</em> good, in the sense that it (even in retrospect) had very few bugs. However, the code was also not <em>modern</em>, in that it didn't have clear abstractions between the components, had no tests (that were published), and was written in a somewhat outdated style.</p>
</li>
</ol>

CC BY-SA 4.0
2023-10-14T12:33:47.443Z
2023-10-15T14:17:00.660Z
2023-10-15T14:17:00.660Z
Pieter Wuille
<ol>
<li><p>I'm not sure anybody could answer this except Satoshi. My guess would be that they were comfortable with it. There's no technical reason why C++ would be chosen over any other language, there are Bitcoin full node implementations in other languages. C++ is fast, C++ can lower development time compared to C and has some more functionality.</p>
</li>
<li><p>I can't speak to this, but I can say that much of the code has changed since then, if you are using this as a proxy for the security Bitcoin provides. A better proxy would be the size of the Bitcoin network, the length of time it has been online without any major security issues, the number of eyes on that code (a lot!), and the strength of the encryption underlying it. There are many classes of security problems the Bitcoin core client could without endangering people's funds.</p>
</li>
</ol>

CC BY-SA 4.0
2023-09-27T07:10:18.400Z
2023-09-27T07:10:18.400Z
Mr. T
<p>I have little knowledge about C++, so I want to ask two questions from &quot;expert&quot; (C++) programmers here:</p>
<ol>
<li><p>Why Satoshi wrote Bitcoin in C++ and not in (for example) C language? any technical reasons? OOP? just a personal choice?</p>
</li>
<li><p>How good is the quality of original Satoshi Bitcoin source code? I saw some opposite viewpoints about this topic on the internet; some say that it is like an academic code with low quality, some say that it is a code written by old pre-2000 C++ standard, some say it is a very secure code with high quality, and...</p>
</li>
</ol>

<bitcoin-core-development><history><satoshi-nakamoto><source-code>
Satoshi's coding quality
Fang
# Satoshi's coding quality

(Asked by: username_0 on 2022-03-23)

I have little knowledge about C++, so I want to ask two questions from "expert" (C++) programmers here:

1. Why Satoshi wrote Bitcoin in C++ and not in (for example) C language? any technical reasons? OOP? just a personal choice?
2. How good is the quality of original Satoshi Bitcoin source code? I saw some opposite viewpoints about this topic on the internet; some say that it is like an academic code with low quality, some say that it is a code written by old pre-2000 C++ standard, some say it is a very secure code with high quality, and...

**Tags:** bitcoin-core-development, history, satoshi-nakamoto, source-code


---

## 2 answers

### Answer by username_1 on 2023-10-14. Score: 1

1. As far as I know, Satoshi never gave a definitive answer on why C++ was chosen, so we can only speculate. There are existing questions on this site about that question, e.g. [Why is bitcoin written in C++?](https://bitcoin.stackexchange.com/q/48414/208)
2. Quality comes in many forms. I think it's fair to say that the original Bitcoin codebase, as published by Satoshi, was *remarkably* good, in the sense that it (even in retrospect) had very few bugs. However, the code was also not *modern*, in that it didn't have clear abstractions between the components, had no tests (that were published), and was written in a somewhat outdated style.


---

### Answer by username_2 on 2023-09-27. Score: -1

1. I'm not sure anybody could answer this except Satoshi. My guess would be that they were comfortable with it. There's no technical reason why C++ would be chosen over any other language, there are Bitcoin full node implementations in other languages. C++ is fast, C++ can lower development time compared to C and has some more functionality.
2. I can't speak to this, but I can say that much of the code has changed since then, if you are using this as a proxy for the security Bitcoin provides. A better proxy would be the size of the Bitcoin network, the length of time it has been online without any major security issues, the number of eyes on that code (a lot!), and the strength of the encryption underlying it. There are many classes of security problems the Bitcoin core client could without endangering people's funds.


---

