Author

Topic: Bitcoin and C++ (Read 368 times)

legendary
Activity: 1624
Merit: 2481
October 05, 2018, 12:59:10 AM
#8
In addition, c++ provides hight level security.

Uhm.. what?  Huh

How shall this be understood ?
A programming language can never provide any level of security.

The security of a project/program/whatever is determined by the way it is programmed, the used functions/checks/etc.. not the programming language..

Rather stability and performance can be determined by the programming language, but definitely not the security.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
September 27, 2018, 03:33:51 AM
#7
I have a related concern with the idea that the Bitcoin Core source code is the Bitcoin protocol specification.

Eventually, the C++ language will go the way of COBOL. Very few people will be able to interpret and maintain the specification in the not-too-distant future.

COBOL was never designed as a general purpose language. Part of the problem with C/C++ is that we are absolutely, irrevocably stuck with it because it is so integral in so many things. It means that newer and potentially better-designed languages have slim chances of succeeding because of C++'s dominance. It isn't going anywhere anytime soon. [...]

To add to that, C/C++ compilers are much better understood and tested than compilers of newer languages. If only by merit of being around for much longer. So while newer languages may seem better designed and more appropriate they still have a couple of years, maybe even decades left until they reach the level of trust and performance of C/C++.

I mean just look at Ada. That language is even older than C/C++ but there's a reason why to this day it's still being used for military and avionic software development.
full member
Activity: 448
Merit: 124
September 26, 2018, 10:24:25 PM
#6
I have a related concern with the idea that the Bitcoin Core source code is the Bitcoin protocol specification.

Eventually, the C++ language will go the way of COBOL. Very few people will be able to interpret and maintain the specification in the not-too-distant future.

COBOL was never designed as a general purpose language. Part of the problem with C/C++ is that we are absolutely, irrevocably stuck with it because it is so integral in so many things. It means that newer and potentially better-designed languages have slim chances of succeeding because of C++'s dominance. It isn't going anywhere anytime soon.

With that said, it might be beneficial to move the core to some high level language/script that is then interpreted by a C++ or any other compiler.
additionally, still there are many improvements for C++, some people thinks C/C++ still has 1999 standards. People should look at C++11, C++14 and C++17 standards to understand how powerful language C++ is.
https://en.wikipedia.org/wiki/C%2B%2B11
https://en.wikipedia.org/wiki/C%2B%2B14
https://en.wikipedia.org/wiki/C%2B%2B17
Ix
full member
Activity: 218
Merit: 128
September 26, 2018, 04:54:35 PM
#5
I have a related concern with the idea that the Bitcoin Core source code is the Bitcoin protocol specification.

Eventually, the C++ language will go the way of COBOL. Very few people will be able to interpret and maintain the specification in the not-too-distant future.

COBOL was never designed as a general purpose language. Part of the problem with C/C++ is that we are absolutely, irrevocably stuck with it because it is so integral in so many things. It means that newer and potentially better-designed languages have slim chances of succeeding because of C++'s dominance. It isn't going anywhere anytime soon.

With that said, it might be beneficial to move the core to some high level language/script that is then interpreted by a C++ or any other compiler.
legendary
Activity: 4466
Merit: 3391
September 26, 2018, 02:21:14 PM
#4
I have a related concern with the idea that the Bitcoin Core source code is the Bitcoin protocol specification.

Eventually, the C++ language will go the way of COBOL. Very few people will be able to interpret and maintain the specification in the not-too-distant future.
legendary
Activity: 3430
Merit: 3080
September 26, 2018, 07:10:09 AM
#3
Bitcoin Core can be quite a resource intensive program, since it is verifying all the transactions on the network and downloading all the blocks.
Using something like Java, whose VM can be quite memory greedy or script languages, such as Python, that do not compile to machine code, wouldn't be the right fit.

Right, well designed C++ is what makes it possible to run the Bitcoin client on e.g. Raspberry Pi type machines, as well as other embedded systems such as a point of sale terminals (although a BTC point of sale terminal running Bitcoin would need to be much more powerful than a typical PoS). Bitcoin written in Java or other memory managed languages would push the minimum requirements up far enough that low power computing devices would cope far worse, and possibly make them not viable platforms for running the Bitcoin client altogether.

C would probably slow development down too much. Some may try to make a case for using newer languages like Go or Rust, or more esoteric ones such as Erlang or Haskell. But I think using C++ is probably more widely used than these, and so will attract more contributors and reviewers. C++ is almost certainly the best suited language for the job.
sr. member
Activity: 490
Merit: 389
Do not trust the government
September 26, 2018, 06:35:12 AM
#2
C languages are one of the most popular and efficient programming languages that are used today, so I would rather ask a question, why not?

Bitcoin Core can be quite a resource intensive program, since it is verifying all the transactions on the network and downloading all the blocks.
Using something like Java, whose VM can be quite memory greedy or script languages, such as Python, that do not compile to machine code, wouldn't be the right fit.

We need something fast, powerful and very familiar to the open source community to use as a reference client for the Bitcoin network.
C++ is a right fit for that.
jr. member
Activity: 98
Merit: 2
September 26, 2018, 04:53:42 AM
#1
I came across that the Bitcoin's core programming language was written in C++. My question is why?
Jump to: