ekiro (OP)
|
|
March 06, 2024, 06:17:38 AM |
|
why
|
|
|
|
Mia Chloe
Sr. Member
Online
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
|
|
March 06, 2024, 06:29:44 AM |
|
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.
|
| | | | | | FIRST NO WAGERING BONUS CASINO & SPORTSBOOK SLOTS │ LIVE CASINO │ LIVE GAMES │ SPORTS | | | ► | WELCOME BONUS ─── UP TO ─── [ $500 ] | | ► | MULTI BET BONUS ─── UP TO ─── [ 200% ] | █████████████▄██▄ ████████████▐█████ ███▄██▄█████▐██████▄ ████████▄▄██████████▄ ███▐██▀██▀███████████ ██████████████████████▄ ███▐▄█████▄████████████▄ ▄▀▀███████████▄███████░█▌ ▀███████████████████████ ░███████████████████████ ░░▀▀▀▄██▄███████████████▄ ░░████▀█▀█████████████████▄▄ ██████▀███████████████████████▄ | [ | PLAY NOW | ] |
|
|
|
pooya87
Legendary
Offline
Activity: 3556
Merit: 10803
|
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.
|
|
|
|
Ruttoshi
Sr. Member
Offline
Activity: 434
Merit: 353
Baba God Noni
|
|
March 06, 2024, 07:22:53 AM Last edit: March 06, 2024, 07:38:51 AM by Ruttoshi |
|
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/
|
| | . Duelbits | │ | | │ | DUELBITS FANTASY SPORTS | ████▄▄▄█████▄▄▄ ░▄████████████████▄ ▐██████████████████▄ ████████████████████ ████████████████████▌ █████████████████████ ████████████████▀▀▀ ███████████████▌ ███████████████▌ ████████████████ ████████████████ ████████████████ ████▀▀███████▀▀ | . ▬▬ VS ▬▬ | ████▄▄▄█████▄▄▄ ░▄████████████████▄ ▐██████████████████▄ ████████████████████ ████████████████████▌ █████████████████████ ███████████████████ ███████████████▌ ███████████████▌ ████████████████ ████████████████ ████████████████ ████▀▀███████▀▀ | /// PLAY FOR FREE /// WIN FOR REAL | │ | █████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ | ██████████████████████████████████████████████████████ . PLAY NOW . ██████████████████████████████████████████████████████ | █████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ | |
|
|
|
Mia Chloe
Sr. Member
Online
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
|
|
March 06, 2024, 07:48:23 AM |
|
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++
|
| | | | | | FIRST NO WAGERING BONUS CASINO & SPORTSBOOK SLOTS │ LIVE CASINO │ LIVE GAMES │ SPORTS | | | ► | WELCOME BONUS ─── UP TO ─── [ $500 ] | | ► | MULTI BET BONUS ─── UP TO ─── [ 200% ] | █████████████▄██▄ ████████████▐█████ ███▄██▄█████▐██████▄ ████████▄▄██████████▄ ███▐██▀██▀███████████ ██████████████████████▄ ███▐▄█████▄████████████▄ ▄▀▀███████████▄███████░█▌ ▀███████████████████████ ░███████████████████████ ░░▀▀▀▄██▄███████████████▄ ░░████▀█▀█████████████████▄▄ ██████▀███████████████████████▄ | [ | PLAY NOW | ] |
|
|
|
Flavatron
Jr. Member
Offline
Activity: 38
Merit: 22
|
|
March 06, 2024, 10:11:58 AM |
|
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.
|
|
|
|
BlackHatCoiner
Legendary
Offline
Activity: 1624
Merit: 7958
Bitcoin is a royal fork
|
|
March 06, 2024, 01:28:10 PM Merited by Pmalek (2), apogio (1) |
|
Because Bitcoin is complex, and complex projects are better to be programmed in object oriented programming. It also comes with rich libraries like STL, which reduce the overall chance for making a mistake, and it improves performance.
C is (usually) faster than C++, but I wouldn't want Bitcoin's source code to be a monster like the Linux kernel, even if it was slightly faster (which isn't necessarily to be the case).
|
|
|
|
promise444c5
Sr. Member
Offline
Activity: 392
Merit: 254
Keep Promises !
|
|
March 06, 2024, 02:20:23 PM Last edit: March 08, 2024, 07:04:38 AM by promise444c5 |
|
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.
Yeah C# is more of object oriented and it has some frameworks which are dedicated to almost every aspect of development. I've tried python a little and I can't compare it's level of OOP to that of C# although they kind of have some related calls but different implementation. C++ and C# C are more popular with Embedded system, C++ provides much more scalability than C (which means it will be easy to read than C) but in term of performance C performs morre faster
|
R |
▀▀▀▀▀▀▀██████▄▄ ████████████████ ▀▀▀▀█████▀▀▀█████ ████████▌███▐████ ▄▄▄▄█████▄▄▄█████ ████████████████ ▄▄▄▄▄▄▄██████▀▀ | LLBIT | │ | CRYPTO FUTURES | | | | | | | | | [ | 1,000x LEVERAGE | ] | [ | . COMPETITIVE FEES | ] | [ | INSTANT EXECUTION | ] | | | ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ | ████████████████████████████████████████████████████████ . TRADE NOW . ████████████████████████████████████████████████████████ | ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ |
|
|
|
pooya87
Legendary
Offline
Activity: 3556
Merit: 10803
|
Since C# was brought up let me add that C# depends on dotnet framework (today that's just called dotnet) by 2007/2008 there were only dotnet framework 3.5 and it was closed source. Microsoft only started releasing the source code on January 2008 which meant when Satoshi was coding Bitcoin it was neither mature nor reviewed enough to be used for something as critical as Bitcoin which relied on security.
Today that's different since dotnet is now open source and very mature which can compete with C++ even in speed and efficiency.
|
|
|
|
apogio
|
|
March 06, 2024, 04:48:26 PM |
|
why
Everything I wanted to add has already been mentioned. C++ is a smart choice in my opinion. Low level language with high compatibility and ease of writting. C can be a pain in the ... Let me ask the obvious question. Why do you think it should be written in C? What would be the benefits. I can't see any benefits apart from speed but C++ is also a very fast language.
|
|
|
|
|
odolvlobo
Legendary
Offline
Activity: 4424
Merit: 3319
|
|
March 07, 2024, 01:22:43 AM |
|
why was bitcoin written in C++ instead of pure C?
I don't think satoshi has ever explained why he chose C++. Anyone can tell you why they would use C++ or C, but only satoshi can answer your question.
|
Join an anti-signature campaign: Click ignore on the members of signature campaigns. PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
|
|
|
NotATether
Legendary
Offline
Activity: 1708
Merit: 7185
In memory of o_e_l_e_o
|
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.
Seriously though, try implementing a linked list or hash table in C. And then again for your second and third project. Then you will see why everyone uses STD for this kind of stuff. There is only so much you can implement without using classes, if you don't want to fill up your program with messy structures and pointers like in the Linux kernel. It makes for an unmaintainable mess.
|
|
|
|
Flavatron
Jr. Member
Offline
Activity: 38
Merit: 22
|
|
March 07, 2024, 09:47:35 AM |
|
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.
Seriously though, try implementing a linked list or hash table in C. And then again for your second and third project. Then you will see why everyone uses STD for this kind of stuff. There is only so much you can implement without using classes, if you don't want to fill up your program with messy structures and pointers like in the Linux kernel. It makes for an unmaintainable mess. 100%. I probably wasn't very clear in my answer, but what I was meaning is C and C++ are very much related( so much so that if certain OO features are not used, the performance is exactly the same). However you are most certainly right, and actually writing something(complex) without using OO = pain!
|
|
|
|
Flavatron
Jr. Member
Offline
Activity: 38
Merit: 22
|
Because Bitcoin is complex, and complex projects are better to be programmed in object oriented programming. It also comes with rich libraries like STL, which reduce the overall chance for making a mistake, and it improves performance.
C is (usually) faster than C++, but I wouldn't want Bitcoin's source code to be a monster like the Linux kernel, even if it was slightly faster (which isn't necessarily to be the case).
True. There has been some momentum around moving the kernel over to Rust, in time. https://www.zdnet.com/article/rust-in-linux-where-we-are-and-where-were-going-next/
|
|
|
|
ekiro (OP)
|
|
March 07, 2024, 08:35:50 PM |
|
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.
Seriously though, try implementing a linked list or hash table in C. And then again for your second and third project. Then you will see why everyone uses STD for this kind of stuff. There is only so much you can implement without using classes, if you don't want to fill up your program with messy structures and pointers like in the Linux kernel. It makes for an unmaintainable mess. makes sense. thank god he didn't use java...
|
|
|
|
promise444c5
Sr. Member
Offline
Activity: 392
Merit: 254
Keep Promises !
|
|
March 08, 2024, 07:11:37 AM |
|
However you are most certainly right, and actually writing something(complex) without using OO = pain! Lol this explains why php has the frame work Laravel it more of OO features but some comes with OO =pain(may be not complex)
|
R |
▀▀▀▀▀▀▀██████▄▄ ████████████████ ▀▀▀▀█████▀▀▀█████ ████████▌███▐████ ▄▄▄▄█████▄▄▄█████ ████████████████ ▄▄▄▄▄▄▄██████▀▀ | LLBIT | │ | CRYPTO FUTURES | | | | | | | | | [ | 1,000x LEVERAGE | ] | [ | . COMPETITIVE FEES | ] | [ | INSTANT EXECUTION | ] | | | ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ | ████████████████████████████████████████████████████████ . TRADE NOW . ████████████████████████████████████████████████████████ | ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ |
|
|
|
apogio
|
|
March 08, 2024, 07:55:23 AM |
|
Seriously though, try implementing a linked list or hash table in C. And then again for your second and third project. Then you will see why everyone uses STD for this kind of stuff.
There is only so much you can implement without using classes, if you don't want to fill up your program with messy structures and pointers like in the Linux kernel. It makes for an unmaintainable mess.
makes sense. thank god he didn't use java... Java is a more advanced C++. It's great for general purpose applications and of course it's easy to use and maintain. Most of the libraries you need are available in Java, so actually customization is minimal, most of the time. On the other hand, NotATether is right about C. In C you can literally do anything you want, because you have direct access to the RAM (memory), using pointers and memory allocation functions ( malloc, calloc etc). However, this "freedom" most of the time comes with an "unmaintainabe mess" (this phrase was perfectly used here).
|
|
|
|
ABCbits
Legendary
Offline
Activity: 2982
Merit: 7829
Crypto Swap Exchange
|
Because Bitcoin is complex, and complex projects are better to be programmed in object oriented programming. It also comes with rich libraries like STL, which reduce the overall chance for making a mistake, and it improves performance.
C is (usually) faster than C++, but I wouldn't want Bitcoin's source code to be a monster like the Linux kernel, even if it was slightly faster (which isn't necessarily to be the case).
True. There has been some momentum around moving the kernel over to Rust, in time. https://www.zdnet.com/article/rust-in-linux-where-we-are-and-where-were-going-next/But so far, Rust (along with other language) remain to have small popularity[1]. In addition, previously Linux kernel already switch from C89 to C11[2]. --snip-- Java is a more advanced C++. It's great for general purpose applications and of course it's easy to use and maintain. Most of the libraries you need are available in Java, so actually customization is minimal, most of the time. --snip--
Does your statement apply to Java in general or just newer Java version? I often hear Java 8.0 or older is hated due to various reasons. [1] https://openhub.net/p/linux/analyses/latest/languages_summary[2] https://www.zdnet.com/article/linus-torvalds-prepares-to-move-the-linux-kernel-to-modern-c/
|
|
|
|
apogio
|
|
March 08, 2024, 02:02:01 PM |
|
I have been a Java software engineer since 2017. When I first started we used Java 6. Now we mainly use Java 11. Certainly Java has evolved. Before Java 8 it was a bit frustrating and not feature rich. Java 8 was a huge development in my opinion. Then Java 11 is also a big step up. Nowadays, Java 19 has some significant new features. What I love about Java is the platform independence and the fact that it is maintained very well. People keep using it and keep supporting its development.
|
|
|
|
|