Pages:
Author

Topic: why was bitcoin written in C++ instead of pure C? - page 2. (Read 490 times)

jr. member
Activity: 38
Merit: 22
I think the OP asked about C, and C++ ... not c# which is totally different. For the most part, the performance of C and C++ are almost identical in most cases if you were not to use the Object Orientated features(like  inheritance, classes, templates, and some others). C# is a high level level language and not really comparable with either of the above, it's level of abstraction is probably on par with Python.

As others have said too, RUST( which in most cases is set to replace c++ by todays estimation, at least it's the plan for some, like the US Biden admin) wasn't even released in 2007. C++ was basically the defacto language for high performance applications.
sr. member
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
Satoshi basic idea was to create a blockchain network that will make financial interactions easy, and make the process very fast. C++ is the best coding language for such

C++ algorithms can perform at the best level by maximizing resource use and giving the developer control over the CPU and memory use. This algorithm also allows the blockchain to accept or reject blocks, thus eradicating any forks in the blockchain. Using C++, therefore, helps the platform interact with different endpoints at fast rates. 

https://cryptoadventure.com/why-satoshi-nakamoto-chose-c-to-program-bitcoin/


Aside from all these you mentioned, Satoshi pick C++ not only because it was the best but it was also the most efficient one for the job at that time.  C++ was picked because many developers at that time knew how to program with it and there were not much alternatives like SOLIDITY and move had not even been invented at that time. Others like Go and rust at that time were not too common.

The block chain is a whole lot of complex cryptographic data so  using C sharp as a base code will bring a lot of bugs because of its inefficiency to carry such heavy program. Plus C sharp doesn't contain certain complex attributes like C++
sr. member
Activity: 476
Merit: 385
Baba God Noni
Satoshi basic idea was to create a blockchain network that will make financial interactions easy, and make the process very fast. C++ is the best coding language for such

C++ algorithms can perform at the best level by maximizing resource use and giving the developer control over the CPU and memory use. This algorithm also allows the blockchain to accept or reject blocks, thus eradicating any forks in the blockchain. Using C++, therefore, helps the platform interact with different endpoints at fast rates.

C++ is the extension of C, and C is a low level programming. C++ has some extra features/libraries one can rely on. C++ is good with complex software.

https://cryptoadventure.com/why-satoshi-nakamoto-chose-c-to-program-bitcoin/

legendary
Activity: 3472
Merit: 10611
In a big application such as a Full Node with a lot of different parts, you don't need to write everything in such a high level language such as C (or even C++ for that matter if you ask me). Usage of C (and in some cases using assembly like in libsec256k1 used for cryptography) is most useful when you want as much efficiency as you can get.
sr. member
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
C++ is a more complex language more like an advanced c sharp. Plus it has some extra attributes and is kind of more reliable than C sharp.
full member
Activity: 154
Merit: 101
Pages:
Jump to: