<blockquote>
  <p>Apart, from having to tear down the entire code, and re-write it in python and check for vulnerabilities, </p>
</blockquote>

<p>This is what is known as a self-answering question. The obstacles you list are not trivial.</p>

<p>There is a considerable cost, a great deal of effort that could instead be spent on functional improvements to existing code.</p>

<p>There is also the matter of losing core developers who are skilled in C++ but may not care to use Python</p>

<p>Also if you are going to switch languages, it would be sensible to evaluate a much larger range. You advocate Python, I like Go, others may push for Rust, Haskell, Java, C# or any of a huge number of other possibilities.</p>

<p>This isn't a can of worms anyone would open lightly.</p>

CC BY-SA 4.0
2019-03-25T11:09:47.353Z
True, the question was self-answering, but what I was looking for was more to what capabilities are being offered by c++ to Bitcoin Core that is difficult to replicate with other modern programming languages. Losing core developers who are skilled in C++ but may not care to use Python, and opening can of worms for other recommendations are a valid point.
Ugam Kamat
CC BY-SA 4.0
2019-03-25T13:52:54.290Z
C++ is a compiled language, so lives much "closer to the metal" than Python, which is an interpreted language. This means C++ can be [more than 100x faster at doing the same job](http://web.archive.org/web/20190210185615/https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/gpp-python3.html). As I'm sure you're aware, someone who can mine 100x faster has a significant advantage so even if Python had been the original language used, it would have changed to C++ (or a similar language) since.
Alistair Mann
CC BY-SA 4.0
2019-03-25T18:47:41.030Z
"Not trivial" ... it would be impossible. The state of the art in engineering can't provide a reasonable level of guarantee that a piece of code in C++ and a piece of code in Python behave the same way in all circumstances (which is what is required to not introduce a fork when making this change).
Pieter Wuille
CC BY-SA 4.0
2019-03-25T10:50:32.157Z
2019-03-25T10:50:32.157Z
RedGrittyBrick
<p>Python offers various advantages including simplified rules of coding and ease of readability. It offers OOP, cross platform compatibility and has numerous libraries that have been added over time. It can be understood why the original Bitcoin Core client was in C++ as python was not that popular as it is now. </p>

<p>Apart, from having to tear down the entire code, and re-write it in python and check for vulnerabilities, why aren't the core bitcoin developers thinking of migrating the entire reference client implementation language to python?</p>

<bitcoin-core><bitcoin-core-development><python><c++>
Why future Bitcoin Core release shouldn't be in python?
Ugam Kamat
# Why future Bitcoin Core release shouldn't be in python?

(Asked by: username_0 on 2019-03-25)

Python offers various advantages including simplified rules of coding and ease of readability. It offers OOP, cross platform compatibility and has numerous libraries that have been added over time. It can be understood why the original Bitcoin Core client was in C++ as python was not that popular as it is now.

Apart, from having to tear down the entire code, and re-write it in python and check for vulnerabilities, why aren't the core bitcoin developers thinking of migrating the entire reference client implementation language to python?

**Tags:** bitcoin-core, bitcoin-core-development, python, c++


---

## 1 answers

### Answer by username_1 on 2019-03-25. Score: 4 | Accepted answer

> Apart, from having to tear down the entire code, and re-write it in python and check for vulnerabilities,

This is what is known as a self-answering question. The obstacles you list are not trivial.

There is a considerable cost, a great deal of effort that could instead be spent on functional improvements to existing code.

There is also the matter of losing core developers who are skilled in C++ but may not care to use Python

Also if you are going to switch languages, it would be sensible to evaluate a much larger range. You advocate Python, I like Go, others may push for Rust, Haskell, Java, C# or any of a huge number of other possibilities.

This isn't a can of worms anyone would open lightly.

> **Comments:**
> **username_0**: True, the question was self-answering, but what I was looking for was more to what capabilities are being offered by c++ to Bitcoin Core that is difficult to replicate with other modern programming languages. Losing core developers who are skilled in C++ but may not care to use Python, and opening can of worms for other recommendations are a valid point.  
> **username_2**: C++ is a compiled language, so lives much "closer to the metal" than Python, which is an interpreted language. This means C++ can be [more than 100x faster at doing the same job](http://web.archive.org/web/20190210185615/https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/gpp-python3.html). As I'm sure you're aware, someone who can mine 100x faster has a significant advantage so even if Python had been the original language used, it would have changed to C++ (or a similar language) since.  
> **username_3**: "Not trivial" ... it would be impossible. The state of the art in engineering can't provide a reasonable level of guarantee that a piece of code in C++ and a piece of code in Python behave the same way in all circumstances (which is what is required to not introduce a fork when making this change).  

---

