1

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?

1 Answer 1

4

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.

3
  • 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
    Commented Mar 25, 2019 at 11:09
  • 1
    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. 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. Commented Mar 25, 2019 at 13:52
  • 4
    "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). Commented Mar 25, 2019 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.