Bitcoin Forum
November 16, 2024, 10:27:38 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: why was Bitcoin written in C++?  (Read 372 times)
Zoomic (OP)
Sr. Member
****
Offline Offline

Activity: 630
Merit: 274



View Profile
May 30, 2023, 09:54:54 PM
 #1

I have tried to figure out why Satoshi decided to go with C++ in writing bitcoin codes. I have some of these assumptions below, I decided to share to learn more;

  • Could it be that C++ is the most popular language then?
  • Could it be that it is the language Satoshi was more conversant with. As a developer,  I try to use the language I know too well, even if it might be inefficient
  • Is there any security advantages of using C++? I mean python also supports open source and Js enhances scalability.  Why the special interest in C++
  • Right now C++ is largely regarded as the best language for crypto coding. Is this accolade given C++ because Satoshi used it and developed the king of cryptocurrency.  Assuming Satoshi used another language,  is there any possibility that the language would be more adopted for crypto coding
  • Finally,  is there any possibility that since 1985 C++ is developed, there will be a time it will become an obsolete language and bitcoin codes will require that it should be re-written in another language?

▄████████████████████████▄
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
██████████████████████████
▀████████████████████████▀
EVO.io 
BRIDGING THE GAP
BETWEEN CRYPTO
AND PLAY 
█████████████████████████
█████████████████████████
████████▀▀░░█░░▀▀████████
██████▀▄░░▄▄█▄▄░░▄▀██████
█████░░░█▀▄▄▄▄▄▀█░░░█████
████░░░███████████░░░████
████▀▀▀███████████▄▄▄████
████░░░███████████░░░████
█████░░░█▄▀▀▀▀▀▄█░░░█████
██████▄▀░░▀▀█▀▀░░▀▄██████
████████▄▄░░█░░▄▄████████
█████████████████████████
█████████████████████████

██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
 
ROULETTE
SLOTS
GAME SHOWS
MANY MORE
|
DEPOSIT BONUS
 
UP
TO
1 BTC + 150 
FREE
SPINS
|████████████▄▄▀▀█
░▄▄▄██████████
██▀▄░▄▄▄███▄███
██▄▀███████
█▀▀████████████
░█████████████████
██████████████████
███████▄▄████▀████
█▄▄██▄█▀▀███▀█████
░█▀██▀▀▀▀███████
▀█▀██▀████████████
██▀█▀▀▀█▀█▀█████████
██▄▄▀▄▄▄█▄▄██████████▄
[ 
Play Now
]
BitMaxz
Legendary
*
Offline Offline

Activity: 3444
Merit: 3175


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
May 30, 2023, 10:35:21 PM
 #2

Satoshi Nakamoto never explains why he chose to use C++ language more than others even on his whitepaper he didn't mention it but you can build blockchain in any language.

However, I think he chose C++ due to the speed and efficiency compared to other languages like Python and it was known that can handle big data.

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
sheenshane
Legendary
*
Offline Offline

Activity: 2506
Merit: 1232



View Profile WWW
May 30, 2023, 10:46:04 PM
Merited by pooya87 (2), vapourminer (1)
 #3

I think he chose C++ due to the speed and efficiency compared to other languages like Python and it was known that can handle big data.
The first thing that comes to my mind is what you've said above because C++ is known for its performance and efficiency when it comes to speed.  Another reason for choosing C++ could be because it was wide availability and a mature ecosystem, C++ has been around for several decades and has a vast community of developers supporting it.

And the last one could be, C++ allowed the Bitcoin developers to have direct access to the systems, enabling them to write code that interacts efficiently with the system resources.  Whatever the reason is, as long as it operates in a decentralized way and C++ was suitable for it.

█████████████████████████████████
████████▀▀█▀▀█▀▀█▀▀▀▀▀▀▀▀████████
████████▄▄█▄▄█▄▄██████████▀██████
█████░░█░░█░░█░░████████████▀████
██▀▀█▀▀█▀▀█▀▀█▀▀██████████████▀██
██▄▄█▄▄█▄▄█▄▄█▄▄█▄▄▄▄▄▄██████████
██░░█░░█░░███████████████████████
██▀▀█▀▀█▀▀███████████████████████
██▄▄█▄▄█▄▄███████████████████████
██░░█░░█░░███████████████████████
██▀▀█▀▀█▀▀██████████▄▄▄██████████
██▄▄█▄▄█▄▄███████████████████████
██░░█░░█░░███████████████████████
██████
██
██
██
██
██
██
██
██
██
██
██
██████
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
 Crypto Marketing Agency
By AB de Royse

████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
██████
██
██
██
██
██
██
██
██
██
██
██
██████
██████
██
██
██
██
██
██
██
██
██
██
██
██████
██████████████████████████████████████████████████████████████████████████████████████████████████
WIN $50 FREE RAFFLE
Community Giveaway

██████████████████████████████████████████████████████████████████████████████████████████████████
██████
██
██
██
██
██
██
██
██
██
██
██
██████
████████████████████████
██
██████████████████████
██████████████████▀▀████
██████████████▀▀░░░░████
██████████▀▀░░░▄▀░░▐████
██████▀▀░░░░▄█▀░░░░█████
████▄▄░░░▄██▀░░░░░▐█████
████████░█▀░░░░░░░██████
████████▌▐░░▄░░░░▐██████
█████████░▄███▄░░███████
████████████████████████
████████████████████████
████████████████████████
Yamane_Keto
Hero Member
*****
Offline Offline

Activity: 630
Merit: 510



View Profile WWW
May 31, 2023, 07:16:01 AM
Merited by pooya87 (2), ABCbits (1)
 #4

I have tried to figure out why Satoshi decided to go with C++ in writing bitcoin codes. I have some of these assumptions below, I decided to share to learn more;
You have to distinguish between Bitcoin, which is a protocol, and the software that runs full nodes, which is Bitcoin Core in our case.
Your question is What made satoshi written Bitcoin core using C++ as the main programming language.

One of the most important advantages of C++ language is that it gives great control over memory usage, the program can be written will be very consistently without the need to rewrite the code from scratch in case you want to write for a different programming language.

You will find more reasons on the internet, but Satoshi had to choose a programming language and this language was C++ because it is the best and he (she or they) may have other reasons, God only knows.

えいごをはなせますか。
goatpig
Legendary
*
Offline Offline

Activity: 3752
Merit: 1364

Armory Developer


View Profile
May 31, 2023, 07:36:51 AM
Merited by d5000 (1)
 #5

AFAIK he was in touch with Wei Dai via various cypherpunk forums. Bitcoin used CryptoPP, Wei Dai' C++ crypto library. I assume that had some weight in the balance.

witcher_sense
Legendary
*
Offline Offline

Activity: 2450
Merit: 4415


🔐BitcoinMessage.Tools🔑


View Profile WWW
May 31, 2023, 07:55:26 AM
Merited by pooya87 (2)
 #6

Could it be that C++ is the most popular language then?
According to the data from https://www.tiobe.com/tiobe-index/, Java, C, and C++ were one of the most popular programming languages in 2008.

Quote
Could it be that it is the language Satoshi was more conversant with. As a developer,  I try to use the language I know too well, even if it might be inefficient
Developers usually write in the languages they are most proficient in, but you can solve the problem with any programming language you like and later reimplement it in another to make the solution more efficient and suitable for particular use cases.

Quote
Is there any security advantages of using C++? I mean python also supports open source and Js enhances scalability.  Why the special interest in C++
As far as I know, C++ has no serious vulnerabilities, and it is supported by a large community of developers and regular contributors. If you want to build a secure system, then C++ is quite suitable for achieving your goal.

Quote
Finally,  is there any possibility that since 1985 C++ is developed, there will be a time it will become an obsolete language and bitcoin codes will require that it should be re-written in another language?
Bitcoin already has dozen of implementations in different languages, so it is not necessary to rely on C++ as a popular choice among developers.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
hZti
Hero Member
*****
Offline Offline

Activity: 1036
Merit: 642

Magic


View Profile
May 31, 2023, 09:06:04 AM
 #7



You will find more reasons on the internet, but Satoshi had to choose a programming language and this language was C++ because it is the best and he (she or they) may have other reasons, God only knows.

It is also believed that satoshi was already of a high age when he created bitcoin, maybe he was already retired or close to his retirement. For this reason he probably was not so fluent in more modern coding languages and also bitcoin works perfectly in C++, so why bother to write it in another langue. You have to remember that at first bitcoin was slimly a project that was managed of a handful of people and nobody would have thought that the adoption would be this huge.

What speaks for this thesis is also that satoshi left bitcoin not long after it was published, since he probably simply retired. That is something a young person would probably not do, but who knows. Satoshi could still be here under another name and nobody would know.
Synchronice
Hero Member
*****
Offline Offline

Activity: 1050
Merit: 870



View Profile
May 31, 2023, 10:17:37 AM
 #8

I would describe bitcoin idea in four words: A currency, blockchain, node and miner.
Satoshi needed to create something that was super secure, resource efficient and fast. You have to keep in mind the equipment that was available back then, there weren't so powerful PCs 15 years ago. Bitcoin's block size was limited to 1MB, mining uses Proof Of Work consensus, blocks should be validated quickly. I don't have a background in programming, I just started learning of javascript recently, so, there may be other reasons why he chose C++ but from all of these, I would say that he chose C++ over others because of its excellent performance, efficiency and support back then.

▄▄███████████████████▄▄
▄███████████████████████▄
████████▀░░░░░░░▀████████
███████░░░░░░░░░░░███████
███████░░░░░░░░░░░███████
██████▀░░░░░░░░░░░▀██████
██████▄░░░░░▄███▄░▄██████
██████████▀▀█████████████
████▀▄██▀░░░░▀▀▀░▀██▄▀███
███░░▀░░░░░░░░░░░░░▀░░███
████▄▄░░░░▄███▄░░░░▄▄████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 CHIPS.GG 
▄▄███████▄▄
▄████▀▀▀▀▀▀▀████▄
███▀░▄░▀▀▀▀▀░▄░▀███
▄███
░▄▀░░░░░░░░░▀▄░███▄
▄███░▄░░░▄█████▄░░░▄░███▄
███░▄▀░░░███████░░░▀▄░███
███░█░░░▀▀▀▀▀░░░▀░░░█░███
███░▀▄░▄▀░▄██▄▄░▀▄░▄▀░██
▀███
░▀░▀▄██▀░▀██▄▀░▀░██▀
▀███
░▀▄░░░░░░░░░▄▀░██▀
▀███▄
░▀░▄▄▄▄▄░▀░▄███▀
▀█
███▄▄▄▄▄▄▄████▀
█████████████████████████
▄▄███████▄▄
███
████████████▄
▄█▀▀▀▄
█████████▄▀▀▀█▄
▄██████▀▄▄▄▄▄▀██████▄
▄█████████████▄████████▄
████████▄███████▄████████
█████▄█████████▄██████
██▄▄▀▀▀▀█████▀▀▀▀▄▄██
▀█████████▀▀███████████▀
▀███████████████████▀
██████████████████
▀████▄███▄▄
████▀
████████████████████████
3000+
UNIQUE
GAMES
|
12+
CURRENCIES
ACCEPTED
|
VIP
REWARD
PROGRAM
 
 
  Play Now  
ABCbits
Legendary
*
Offline Offline

Activity: 3066
Merit: 8090


Crypto Swap Exchange


View Profile
May 31, 2023, 10:50:19 AM
Merited by pooya87 (2)
 #9

    • Finally,  is there any possibility that since 1985 C++ is developed, there will be a time it will become an obsolete language and bitcoin codes will require that it should be re-written in another language?

    As long as C++ remain popular and actively receive new update/standard, it won't become obselete. For reference, C++20 standard already released while C++23 standard still in progress.



    Could it be that C++ is the most popular language then?
    According to the data from https://www.tiobe.com/tiobe-index/, Java, C, and C++ were one of the most popular programming languages in 2008.

    TIOBE use very poor data source though, since it seems they rely on total search result with specific keyword on few different search engine.

    The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

    █▀▀▀











    █▄▄▄
    ▀▀▀▀▀▀▀▀▀▀▀
    e
    ▄▄▄▄▄▄▄▄▄▄▄
    █████████████
    ████████████▄███
    ██▐███████▄█████▀
    █████████▄████▀
    ███▐████▄███▀
    ████▐██████▀
    █████▀█████
    ███████████▄
    ████████████▄
    ██▄█████▀█████▄
    ▄█████████▀█████▀
    ███████████▀██▀
    ████▀█████████
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    c.h.
    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
    ▀▀▀█











    ▄▄▄█
    ▄██████▄▄▄
    █████████████▄▄
    ███████████████
    ███████████████
    ███████████████
    ███████████████
    ███░░█████████
    ███▌▐█████████
    █████████████
    ███████████▀
    ██████████▀
    ████████▀
    ▀██▀▀
    Yamane_Keto
    Hero Member
    *****
    Offline Offline

    Activity: 630
    Merit: 510



    View Profile WWW
    May 31, 2023, 12:43:36 PM
     #10


    It is also believed that satoshi was already of a high age when he created bitcoin, maybe he was already retired or close to his retirement. For this reason he probably was not so fluent in more modern coding languages and also bitcoin works perfectly in C++, so why bother to write it in another langue. You have to remember that at first bitcoin was slimly a project that was managed of a handful of people and nobody would have thought that the adoption would be this huge.

    All the ideas related to Bitcoin were already present, and even the idea of ​​Bitcoin has a historical basis before 2008, but Satoshi was the only one who developed it for a valuable model, and Satoshi was not an exceptionally experienced software developer, and this is evidenced by the presence of a lot of bugs in the versions that he developed .

    Age is not a measure. For example, a 15-year-old teenager was able to hack a *wallet* claiming to be an unhackable crypto wallet.
    https://techcrunch.com/2018/08/14/unhackable-bitfi-crypto-wallet-has-been-hacked/

    Source researchgate/Elise Alfieri

    えいごをはなせますか。
    darkv0rt3x
    Hero Member
    *****
    Offline Offline

    Activity: 1274
    Merit: 681


    I rather die on my feet than to live on my knees


    View Profile
    May 31, 2023, 02:30:44 PM
     #11

    I also think that C++ was chosen mostly because of 2 reasons. Who wrote either the protocol and the software Bitcoin core where comfortable with the programming language and also because C++ allows a very more "user-friendly" memory management than for instance, languages of lower level such as pure C. Also, trying to build applications which requires graphics like windows and boxes, buttons and so on, in pure C, requires the usage of external libraries such has SDL, and despite the fact tha tI don't know much about it, I know it is very easy to get quite complex and probably less efficient and slower than using C++ or other OOP languages.

    Bitcoin is energy. Bitcoin is freedom
    I rather die on my feet than living on my knees!
    gmaxwell
    Moderator
    Legendary
    *
    expert
    Offline Offline

    Activity: 4284
    Merit: 8808



    View Profile WWW
    May 31, 2023, 02:45:06 PM
    Last edit: May 31, 2023, 03:01:14 PM by gmaxwell
    Merited by BlackHatCoiner (6), PowerGlove (4), ABCbits (3), Yamane_Keto (3), pooya87 (2), DdmrDdmr (1)
     #12

    All the ideas related to Bitcoin were already present, and even the idea of ​​Bitcoin has a historical basis before 2008
    Sorry, but in the interest of slowing the spread of misinformation this is just plainly false.  The idea of using a distributed anonymous cryptographic lottery to form a consensus is the revolutinary idea in Bitcoin and it had no historical precedent.  People were working on the problem since at least 2001 (search spent-twice) and not finding the answer-- even though they were well aware of the predecessor technologies:  The linked discussion included Hal Finney (eventual creator of RPOW), Adam Back (inventor of hashcash), and Peter Todd (eventual Bitcoin developer).

    Quote
    and Satoshi was not an exceptionally experienced software developer, and this is evidenced by the presence of a lot of bugs in the versions that he developed .
    Sorry but that is also a fairly clear falsehood, one spread by inept and inexperienced developers to make themselves sound smarter.  Bitcoin was written in a modern style, almost entirely free of manual memory management.  Normally in industrial software you expect a defect rate of worse than 1 bug per thousand lines of code and bitcoin had a much higher proportion of tricky parts so I would expect a higher defect rate than typical.  Yet the original bitcoin software had an extremely low defect rate-- a few bugs in script mostly.  More than a few of the 'early' bugs found in 2011-2013 were introduced *later* after the initial release, the qualify of Bitcoin fell when public development began but then improved.  The defect rate in the original Bitcoin was significantly better than later developed altcoins which had the benefit of Bitcoin as an example and in some cases extremely experienced developers.  Comments by reviewers back in 2011 were mostly along the lines of "issues you expect to be there just aren't there".  The low defect rate is particularly surprising for a one-person project and has even been a reason some people have wondered if Satoshi didn't have more help than he made publicly known.

    Some of these comments are because the original software lacked the modularity that would make sense for the later feature set, but those later features weren't imagined at the start so designing for them would have been an error and would have increased the defect rate.  It's easy to be critical in hindsight *after* you know the features that would later be developed.  But given the amount of *churn* in Bitcoin core, if choice of the correct abstractions and modules is a metric to judge experience we could say it supports an argument that Satoshi was more experience than the entire Core project is today (lol, but I don't think choice of abstractions is a very good metric).

    It's possible that Satoshi was inexperienced but was a natural at it and worked very hard to get it right, but we absolutely can't say that there was poor software quality which implied inexperience.  I can't think of a single concrete "inexperienced developers do this" error that anyone has cited (other than the lament that it was not very modular).  Even the script bugs, they mostly arose through bad and surprising abstractions in library code-- not because of erroneous code that Satoshi wrote, maybe you could argue that failure to anticipate the library code being junk was a mark of inexperience but by that standard almost no one ever becomes experienced.


    For this reason he probably was not so fluent in more modern coding languages and also bitcoin works perfectly in C++, so why bother to write it in another langue.
    What more modern language would he have used?  The likely candidates that existed at the time have extremely poor performance (particularly memory usage overheads but also runtime), given that Bitcoin has many times been at the breaking point keeping up with the traffic and there are no alternative implementations with acceptable performance written in those more modern languages even today, I think that would have been unwise indeed.


    Kryptowerk
    Legendary
    *
    Offline Offline

    Activity: 2114
    Merit: 1403


    Disobey.


    View Profile
    May 31, 2023, 10:35:31 PM
     #13


    Quote
    and Satoshi was not an exceptionally experienced software developer, and this is evidenced by the presence of a lot of bugs in the versions that he developed .
    Sorry but that is also a fairly clear falsehood, one spread by inept and inexperienced developers to make themselves sound smarter.  Bitcoin was written in a modern style, almost entirely free of manual memory management.  Normally in industrial software you expect a defect rate of worse than 1 bug per thousand lines of code and bitcoin had a much higher proportion of tricky parts so I would expect a higher defect rate than typical.  Yet the original bitcoin software had an extremely low defect rate [...]

    Thanks for these very informative and intersting lines on Satoshis coding skills. I vaguely remember reading a similar comment years ago, but with less substance and also less infotainment factor.
    You mentioned the low error-to-codel-ratio could be an indication for a team working behind the pseudonym of Satoshi - how likely do you personally rate this hypothesis to be true and are there other indicators pointing in that direction?

    Get educated about Bitcoin. Check out Andreas Antonopoulos on Youtube. An old but gold talk: https://www.youtube.com/watch?v=rc744Z9IjhY

    UPDATE 2024: Daniel Schmachtenberger on The Meta-Crisis: https://www.youtube.com/watch?v=LSx8j8lSewA Important talk about the current state of this planet and human society in general.
    NotATether
    Legendary
    *
    Offline Offline

    Activity: 1792
    Merit: 7385


    Top Crypto Casino


    View Profile WWW
    June 01, 2023, 06:48:12 AM
     #14

    Right now C++ is largely regarded as the best language for crypto coding. Is this accolade given C++ because Satoshi used it and developed the king of cryptocurrency.  Assuming Satoshi used another language,  is there any possibility that the language would be more adopted for crypto coding

    The only reason why it is believed that C++ is the most popular language for developing crypto projects is that thousands of projects are just forks of Bitcoin and Monero which all use C++.

    These don't have smart contracts so they can't just write a token for it like Ethereum (which is written in Golang) and derivatives, they have to clone the entire physical codebase.

    Also many of the more "modern" languages did not exist back in 2008 when Satoshi started coding this thing. There was really only C/C++, Java, Python, ... you get the idea. Be thankful that he didn't write it in Delphi or Pascal Smiley

    ███████████████████████
    ████▐██▄█████████████████
    ████▐██████▄▄▄███████████
    ████▐████▄█████▄▄████████
    ████▐█████▀▀▀▀▀███▄██████
    ████▐███▀████████████████
    ████▐█████████▄█████▌████
    ████▐██▌█████▀██████▌████
    ████▐██████████▀████▌████
    █████▀███▄█████▄███▀█████
    ███████▀█████████▀███████
    ██████████▀███▀██████████

    ███████████████████████
    .
    BC.GAME
    ▄▄▀▀▀▀▀▀▀▄▄
    ▄▀▀░▄██▀░▀██▄░▀▀▄
    ▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
    ▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
    ▄▀░▀░░█░▄███████▄░█░░▀░▀▄
    █░█░▀░█████████████░▀░█░█
    █░██░▀█▀▀█▄▄█▀▀█▀░██░█
    █░█▀██░█▀▀██▀▀█░██▀█░█
    ▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
    ▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
    ▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
    ▀▄▄▀▀███▄███▀▀▄▄▀
    ██████▄▄▄▄▄▄▄██████
    .
    ..CASINO....SPORTS....RACING..


    ▄▄████▄▄
    ▄███▀▀███▄
    ██████████
    ▀███▄░▄██▀
    ▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
    ▄███▀▀▀████▄▄██▀▄███▀▀███▄
    ███████▄▄▀▀████▄▄▀▀███████
    ▀███▄▄███▀░░░▀▀████▄▄▄███▀
    ▀▀████▀▀████████▀▀████▀▀
    BlackHatCoiner
    Legendary
    *
    Offline Offline

    Activity: 1708
    Merit: 8343


    Fiatheist


    View Profile WWW
    June 01, 2023, 08:13:53 PM
     #15

    I tend to believe it's because C/C++ has probably the best readability : efficiency tradeoffs, at least comparably to the high level languages of that time. C is pretty much the father of programming languages; just think that the entire linux kernel is written in C. And, while efficiency isn't prioritized in many software, I think Bitcoin needs to run efficiently. Otherwise, someone else will write a more efficient alternative.

    █▀▀▀











    █▄▄▄
    ▀▀▀▀▀▀▀▀▀▀▀
    e
    ▄▄▄▄▄▄▄▄▄▄▄
    █████████████
    ████████████▄███
    ██▐███████▄█████▀
    █████████▄████▀
    ███▐████▄███▀
    ████▐██████▀
    █████▀█████
    ███████████▄
    ████████████▄
    ██▄█████▀█████▄
    ▄█████████▀█████▀
    ███████████▀██▀
    ████▀█████████
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    c.h.
    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
    ▀▀▀█











    ▄▄▄█
    ▄██████▄▄▄
    █████████████▄▄
    ███████████████
    ███████████████
    ███████████████
    ███████████████
    ███░░█████████
    ███▌▐█████████
    █████████████
    ███████████▀
    ██████████▀
    ████████▀
    ▀██▀▀
    Zoomic (OP)
    Sr. Member
    ****
    Offline Offline

    Activity: 630
    Merit: 274



    View Profile
    June 01, 2023, 11:27:37 PM
     #16

    Right now C++ is largely regarded as the best language for crypto coding. Is this accolade given C++ because Satoshi used it and developed the king of cryptocurrency.  Assuming Satoshi used another language,  is there any possibility that the language would be more adopted for crypto coding

    The only reason why it is believed that C++ is the most popular language for developing crypto projects is that thousands of projects are just forks of Bitcoin and Monero which all use C++.
    This makes alot of sense to me. Since the codes system is open source, it was accessible to many who cloned it and mare make lily changes to create their own coin. This should be the genesis of C++ as the most popular language for crypto projects development.

    • Finally,  is there any possibility that since 1985 C++ is developed, there will be a time it will become an obsolete language and bitcoin codes will require that it should be re-written in another language?

    As long as C++ remain popular and actively receive new update/standard, it won't become obselete. For reference, C++20 standard already released while C++23 standard still in progress.

    Great to remind me of this. I think I wasn't thinking then....

    ▄████████████████████████▄
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ██████████████████████████
    ▀████████████████████████▀
    EVO.io 
    BRIDGING THE GAP
    BETWEEN CRYPTO
    AND PLAY 
    █████████████████████████
    █████████████████████████
    ████████▀▀░░█░░▀▀████████
    ██████▀▄░░▄▄█▄▄░░▄▀██████
    █████░░░█▀▄▄▄▄▄▀█░░░█████
    ████░░░███████████░░░████
    ████▀▀▀███████████▄▄▄████
    ████░░░███████████░░░████
    █████░░░█▄▀▀▀▀▀▄█░░░█████
    ██████▄▀░░▀▀█▀▀░░▀▄██████
    ████████▄▄░░█░░▄▄████████
    █████████████████████████
    █████████████████████████

    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
    ██
     
    ROULETTE
    SLOTS
    GAME SHOWS
    MANY MORE
    |
    DEPOSIT BONUS
     
    UP
    TO
    1 BTC + 150 
    FREE
    SPINS
    |████████████▄▄▀▀█
    ░▄▄▄██████████
    ██▀▄░▄▄▄███▄███
    ██▄▀███████
    █▀▀████████████
    ░█████████████████
    ██████████████████
    ███████▄▄████▀████
    █▄▄██▄█▀▀███▀█████
    ░█▀██▀▀▀▀███████
    ▀█▀██▀████████████
    ██▀█▀▀▀█▀█▀█████████
    ██▄▄▀▄▄▄█▄▄██████████▄
    [ 
    Play Now
    ]
    SamReomo
    Hero Member
    *****
    Offline Offline

    Activity: 994
    Merit: 757


    Top Crypto Casino


    View Profile
    June 02, 2023, 05:56:34 AM
     #17

    I have tried to figure out why Satoshi decided to go with C++ in writing bitcoin codes. I have some of these assumptions below, I decided to share to learn more;

    • Could it be that C++ is the most popular language then?
    • Could it be that it is the language Satoshi was more conversant with. As a developer,  I try to use the language I know too well, even if it might be inefficient
    • Is there any security advantages of using C++? I mean python also supports open source and Js enhances scalability.  Why the special interest in C++
    • Right now C++ is largely regarded as the best language for crypto coding. Is this accolade given C++ because Satoshi used it and developed the king of cryptocurrency.  Assuming Satoshi used another language,  is there any possibility that the language would be more adopted for crypto coding
    • Finally,  is there any possibility that since 1985 C++ is developed, there will be a time it will become an obsolete language and bitcoin codes will require that it should be re-written in another language?

    I agree with the answers of the reputed members of the forum but in my mind the answer is a little different. I think Satoshi chose to write Bitcoin in C++ programming language because he was good at that language and his main programming language at that time might be C++ because of the wide acceptability. He might have also tried the thing using other codes and failed to get it into the state that C++ helped him to get. I might be wrong but that's what I think of right now.

    Everyone knows that C++ was and is one of the most famous programming languages out there and many of the top software creators have mastered the language and have built applications specifically in that language.  Some of those well known applications that have been built using C++ code are Adobe Photoshop, Google chrome, Git, Dropbox, and many others. The most of the AAA titles use that language for creating those high graphics games. Even the operating systems are mainly codded with C++ programming language.

    In 2008 the best language for programmers was C++ and there were many guides, and tutorials available for that language. Other languages weren't as efficient and as useful for creating high quality software piece in those times, the best programmers of the era chose C++ for their projects and most of those applications are still based on the same code with fixed bugs and added features.

    So, if we keep all those things in our mind than it was a good decision to chose C++ over other programming languages to create a safe and useful digital currency for the world. Even if we leave the coding language behind, it's still a inspiring thing to notice that someone like Satoshi gave us a gift in the form of Bitcoin and he was so sincere that he left it in the hands of the community. If fame was his intention then he would never disappear from the scene, and trust me he would be among the richest and most famous people of the world if he didn't chose to disappear.

    ███▄▀██▄▄
    ░░▄████▄▀████ ▄▄▄
    ░░████▄▄▄▄░░█▀▀
    ███ ██████▄▄▀█▌
    ░▄░░███▀████
    ░▐█░░███░██▄▄
    ░░▄▀░████▄▄▄▀█
    ░█░▄███▀████ ▐█
    ▀▄▄███▀▄██▄
    ░░▄██▌░░██▀
    ░▐█▀████ ▀██
    ░░█▌██████ ▀▀██▄
    ░░▀███
    ▄▄██▀▄███
    ▄▄▄████▀▄████▄░░
    ▀▀█░░▄▄▄▄████░░
    ▐█▀▄▄█████████
    ████▀███░░▄░
    ▄▄██░███░░█▌░
    █▀▄▄▄████░▀▄░░
    █▌████▀███▄░█░
    ▄██▄▀███▄▄▀
    ▀██░░▐██▄░░
    ██▀████▀█▌░
    ▄██▀▀██████▐█░░
    ███▀░░
    ABCbits
    Legendary
    *
    Offline Offline

    Activity: 3066
    Merit: 8090


    Crypto Swap Exchange


    View Profile
    June 02, 2023, 09:15:17 AM
    Merited by BlackHatCoiner (4)
     #18

    C is pretty much the father of programming languages; just think that the entire linux kernel is written in C.

    Not entire linux kernel though, very small amount of linux kernel are also written with Assembly, C++ and Rust.

    Everyone knows that C++ was and is one of the most famous programming languages out there and many of the top software creators have mastered the language and have built applications specifically in that language.  Some of those well known applications that have been built using C++ code are Adobe Photoshop, Google chrome, Git, Dropbox, and many others. The most of the AAA titles use that language for creating those high graphics games. Even the operating systems are mainly codded with C++ programming language.

    In 2008 the best language for programmers was C++ and there were many guides, and tutorials available for that language. Other languages weren't as efficient and as useful for creating high quality software piece in those times, the best programmers of the era chose C++ for their projects and most of those applications are still based on the same code with fixed bugs and added features.

    While C++ indeed is great programming language, i can't help but think your statement is just very biased towards C++.
    1. C++ is far from most famous programming language based on https://survey.stackoverflow.co/2022/.
    2. Linux is almost entirely written with C, while Windows and Mac also use C. See https://stackoverflow.com/a/580300.
    3. There's no such thing such as best programming language.

    █▀▀▀











    █▄▄▄
    ▀▀▀▀▀▀▀▀▀▀▀
    e
    ▄▄▄▄▄▄▄▄▄▄▄
    █████████████
    ████████████▄███
    ██▐███████▄█████▀
    █████████▄████▀
    ███▐████▄███▀
    ████▐██████▀
    █████▀█████
    ███████████▄
    ████████████▄
    ██▄█████▀█████▄
    ▄█████████▀█████▀
    ███████████▀██▀
    ████▀█████████
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    c.h.
    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
    ▀▀▀█











    ▄▄▄█
    ▄██████▄▄▄
    █████████████▄▄
    ███████████████
    ███████████████
    ███████████████
    ███████████████
    ███░░█████████
    ███▌▐█████████
    █████████████
    ███████████▀
    ██████████▀
    ████████▀
    ▀██▀▀
    DaveF
    Legendary
    *
    Offline Offline

    Activity: 3654
    Merit: 6671


    Crypto Swap Exchange


    View Profile WWW
    June 02, 2023, 10:35:23 AM
     #19

    I am going to have to go with the theory of what most things are written in a particular language. It's white the person knows.

    Many times, we have done things for web-based apps in PHP that we know can be done more efficiently using a different language. But, and this is a huge BUT everybody in the office knows PHP everybody in the office can deal with any issues if they come up. So PHP it is. Satoshi could have done it differently, but if C++ was what was known then that is what was used.

    -Dave

    █▀▀▀











    █▄▄▄
    ▀▀▀▀▀▀▀▀▀▀▀
    e
    ▄▄▄▄▄▄▄▄▄▄▄
    █████████████
    ████████████▄███
    ██▐███████▄█████▀
    █████████▄████▀
    ███▐████▄███▀
    ████▐██████▀
    █████▀█████
    ███████████▄
    ████████████▄
    ██▄█████▀█████▄
    ▄█████████▀█████▀
    ███████████▀██▀
    ████▀█████████
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    c.h.
    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
    ▀▀▀█











    ▄▄▄█
    ▄██████▄▄▄
    █████████████▄▄
    ███████████████
    ███████████████
    ███████████████
    ███████████████
    ███░░█████████
    ███▌▐█████████
    █████████████
    ███████████▀
    ██████████▀
    ████████▀
    ▀██▀▀
    Kryptowerk
    Legendary
    *
    Offline Offline

    Activity: 2114
    Merit: 1403


    Disobey.


    View Profile
    June 02, 2023, 11:57:04 PM
     #20

    I am going to have to go with the theory of what most things are written in a particular language. It's white the person knows.

    Many times, we have done things for web-based apps in PHP that we know can be done more efficiently using a different language. But, and this is a huge BUT everybody in the office knows PHP everybody in the office can deal with any issues if they come up. So PHP it is. Satoshi could have done it differently, but if C++ was what was known then that is what was used.

    -Dave
    Agreed, anyone that's not a mulit-language genius will stick to what they know best.
    However the question should also be, why did Satoshi and future Bitcoin devs know c++ so well? One reason is probably the time-period they learned computer-science related stuff - until the early 2000s c++ was still very popular, before the uprising of Javascript and other web-focused languages.
    Another very important aspect as to why c++ is probably one of the best fits for Bitcoin Core is it's closeness to Assembly. C and C++ allow low-level memory management and offer one of best performances compared to a ton of newer languages.
    These are just my amateur guesses though. Smiley

    Get educated about Bitcoin. Check out Andreas Antonopoulos on Youtube. An old but gold talk: https://www.youtube.com/watch?v=rc744Z9IjhY

    UPDATE 2024: Daniel Schmachtenberger on The Meta-Crisis: https://www.youtube.com/watch?v=LSx8j8lSewA Important talk about the current state of this planet and human society in general.
    Pages: [1] 2 »  All
      Print  
     
    Jump to:  

    Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!