Author

Topic: Programming Languages for Crypto, which is the best? (Read 173 times)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
Is it because Python is like coding with pre-selected templates and C++ is more customisable?
No, both are turing-complete.

Most programming languages (their abstract models, maybe with some particular constructs that assume finite memory omitted), conventional and unconventional, are Turing-complete. This includes:

    All general-purpose languages in wide use.
        Procedural programming languages such as C, Pascal.
        Object-oriented languages such as Java, Smalltalk or C#.
        Multi-paradigm languages such as Ada, C++, Common Lisp, Fortran, Object Pascal, Perl, Python, R.
    Most languages using less common paradigms:
        Functional languages such as Lisp and Haskell.
        Logic programming languages such as Prolog.
        General-purpose macro processor such as m4.
        Declarative languages such as XSLT.[3]
        VHDL and other hardware description languages.
        TeX, a typesetting system.
        Esoteric programming languages, a form of mathematical recreation in which programmers work out how to achieve basic programming constructs in an extremely difficult but mathematically Turing-equivalent language.
sr. member
Activity: 1056
Merit: 270
I can understand that C++ is one of the easiest of all the programming languages but I find it interesting that no big project from the cryptocurrencies side is written in Python.Python is a massively widely used programming language but I believe in the end it is what the programmer of a specific crypto feels the most comfortable in that environment.

Lately though the use of LAMP-(Linux,Apache,MariaDB,PHP) is widely used in my country where we are undergoing a big change and making online fiscalization(declaring every sale online,I know we are far behind in this),most of the programs are written with those tools.

In the end there is no final and exact answer to your question.

Is it because Python is like coding with pre-selected templates and C++ is more customisable?
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
When you say not written properly do you mean that the programmer typed the code in a different style not written in its native way but output is the same?
I meant that the programmers have to write procedurally. This brings the following benefits;
I agree, procedural > object oriented any day of the week Grin But even then, there's super poorly written and super nicely written procedural code!

I'm thinking what programming language central banks around the world will use for their new upcoming centralized CBDC's?

Central Banks have to gain trust from the millions of people (population) living in that country so security has to be top notch no bugs right?
The programming language doesn't make a software project secure or insecure / bugs or no bugs. You're really overestimating what kind of impact the choice of language has.

Though probably a language like Rust would make sense since it enforces tons of stuff out of the box, which prevents lots of possible bugs from the get-go. But it's merely a help for the devs. If they know what they are doing, they can achieve equal security with C++.
There's the counter-argument that you shouldn't take Rust code as perfect just because it has these checks and assertions built-in and it could lead to a false sense of security.

So all in all, yeah, the language choice isn't what makes a software project bug-free or bug-filled. Like not at all.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
When you say not written properly do you mean that the programmer typed the code in a different style not written in its native way but output is the same?
I meant that the programmers have to write procedurally. This brings the following benefits;

  • The solution to a problem can be represented in an easier way.
  • Code can be read by third parties.
  • Bugs or anything that requires correction can be tackled painlessly.

Central Banks have to gain trust from the millions of people (population) living in that country so security has to be top notch no bugs right?
Wrong! We're humans. We're meant to do mistakes. Sometimes even the government does (if not most of the times). There'll be bugs in CBDCs too, you'll just be discouraged to cheat the system.
sr. member
Activity: 1056
Merit: 270
I'm thinking what programming language central banks around the world will use for their new upcoming centralized CBDC's?

Central Banks have to gain trust from the millions of people (population) living in that country so security has to be top notch no bugs right?
jr. member
Activity: 840
Merit: 6
I hear that Rust is the best. Newer blockchains like Solana and NEAR protocol use Rust, so do popular dapps like NEAR lands and Ref Finance. I think Solana uses C optionally too and NEAR can run EVM/solidity with Aurora.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
Bitcoin has a current $800 billion dollar marketcap.

Lets say 1 of those IT security researchers find a vulnerability in the Bitcoin C++ code today. How much is a bounty is worth for paying this IT researcher to potentially save a $800 billion dollar blockchain? Priceless? I'm sure its not to make their CV's look good to land a good tech job at Facebook getting a 80k salary a year  Roll Eyes
It's impossible to prove the inexistence of anything, but there are (most probably) no bugs that allow an attacker to just move all BTC in existence into their pocket Wink It is other bugs, smaller things usually that are found. Also I don't think there are bug bountys for Bitcoin Core, since there's no corporation or anything behind it that would pay them. I was talking in general, since you asked why people would voluntarily look at open source projects and search for bugs.

I'm wondering how you're here for more than 4 years and don't know how open source works Shocked
Edit: ohhhh, altcoiner.... Grin https://ninjastic.space/user/very_452001


meta, but: you're not supposed to write 2 consecutive posts, instead do one larger one.
sr. member
Activity: 1056
Merit: 270
I think this belongs in the Dev & Tech board.


Bitcoin is written in C++.
Ethereum is written in Go and C.
Cardano is written in Haskell and Nix.
Polkadot is written in Rust.

As you may see, there's no standard programming language for cryptocurrencies and I could keep mentioning some other altcoins with less market cap. The programming languages are all fine if you know how to work on them.

The question is why Charles used Haskell for Cardano, what does Haskell has that other programming languages don't?
It's probably what Charles knows better.

Can the same be said about Crypto blockchains?
This can be said for anything that hasn't be written properly. The programmers must be very determinant when they code. Confused writeups may bring confusion to the ones who'll have to read the code.

When you say not written properly do you mean that the programmer typed the code in a different style not written in its native way but output is the same?

For example the language English, if somebody asked me what I am doing and I responded I'm chilling instead of using the word relaxing, so its like I'm saying a slang word instead of a proper English word then can that cause confusion for programmers who are good at that 1 programming language looking at the open source code?



On that note how many random programmers out there at any one time look at these open source codes so the random programmer can do a charitable service by investing his/her time for free by looking at these open source codes to find bugs/errors to notify the developers to patch up? Do such free beta testers exist in the crypto world?
There are many incentives for helping open source projects; you're right that almost nobody does it 'for free' Grin

Some open source projects (like hardware wallet manufacturers who put their firmware code on GitHub) offer bounties for finding security bugs. So in that case, purely financial incentive.
IT security researchers analyse the Bitcoin codebase, or e.g. Linux kernel to write papers about the vulnerabilities they find. This helps their CV and recognition in the industry.

These are just two possible incentives and of course there are also the selfless helpers who maybe retired early due to crypto gains or just have lots of spare time and help the community by looking for bugs, similarly to the Bitcoin Core devs who also don't get paid for their time working on this project.

Bitcoin has a current $800 billion dollar marketcap.

Lets say 1 of those IT security researchers find a vulnerability in the Bitcoin C++ code today. How much is a bounty is worth for paying this IT researcher to potentially save a $800 billion dollar blockchain? Priceless? I'm sure its not to make their CV's look good to land a good tech job at Facebook getting a 80k salary a year  Roll Eyes

[moderator's note: consecutive posts merged]
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
On that note how many random programmers out there at any one time look at these open source codes so the random programmer can do a charitable service by investing his/her time for free by looking at these open source codes to find bugs/errors to notify the developers to patch up? Do such free beta testers exist in the crypto world?
There are many incentives for helping open source projects; you're right that almost nobody does it 'for free' Grin

Some open source projects (like hardware wallet manufacturers who put their firmware code on GitHub) offer bounties for finding security bugs. So in that case, purely financial incentive.
IT security researchers analyse the Bitcoin codebase, or e.g. Linux kernel to write papers about the vulnerabilities they find. This helps their CV and recognition in the industry.

These are just two possible incentives and of course there are also the selfless helpers who maybe retired early due to crypto gains or just have lots of spare time and help the community by looking for bugs, similarly to the Bitcoin Core devs who also don't get paid for their time working on this project.
sr. member
Activity: 1056
Merit: 270
Best Cryptocurrency Programming Language is a popular language to create the best conditions for developers to unleash their full potential. I support popular programming languages like you mentioned above. The use of new programming languages and jargon will only complicate developers. They need to be proficient in those languages because otherwise when there is an error in the blockchain, the consequences will be huge and take a long time to fix.

But decentralized cryptos and blockchains supposedly suppose to have open-source codes meaning anyone can view the programming codes used to create the project. Not everyone is a programmer so if you pick 100 random people off the street to look at the code they wont have a clue what they are looking at never mind finding bad code or bugs to fix/patch that can bring down a project.

On that note how many random programmers out there at any one time look at these open source codes so the random programmer can do a charitable service by investing his/her time for free by looking at these open source codes to find bugs/errors to notify the developers to patch up? Do such free beta testers exist in the crypto world?
full member
Activity: 680
Merit: 103
As I know Bitcoin was written in C++. But I don't think that it the best language for crypto. You have forgot about languages specially for smart-contracts and altcoins. I am talking about Solidity that is mostly used in Ethereum. I am learning this language as to become blockchain developer in the future, but actually, this language is connected with others, there are many features of Java Script for example.
legendary
Activity: 3318
Merit: 1247
Bitcoin Casino Est. 2013
I can understand that C++ is one of the easiest of all the programming languages but I find it interesting that no big project from the cryptocurrencies side is written in Python.Python is a massively widely used programming language but I believe in the end it is what the programmer of a specific crypto feels the most comfortable in that environment.

Lately though the use of LAMP-(Linux,Apache,MariaDB,PHP) is widely used in my country where we are undergoing a big change and making online fiscalization(declaring every sale online,I know we are far behind in this),most of the programs are written with those tools.

In the end there is no final and exact answer to your question.
legendary
Activity: 4466
Merit: 3391
That is a common question asked by programming newbies. The answer is always the same:

There is no best language for any technology.

Like any technology, Bitcoin development encompasses a variety of applications, and each one has different requirements. No language would be suitable for every application, so there is no best language.

Bitcoin Core is C++, but there are other Bitcoin node projects in other languages. Either way, the fact that Bitcoin is C++ doesn't mean that all software related to Bitcoin should be written in C++.

If you are wondering which language you should learn first, then my recommendation is to learn a popular procedural language with a simple syntax and a simple development environment, such as Python. Starting with C++ is like learning to fly on an airliner.
full member
Activity: 826
Merit: 105
Best Cryptocurrency Programming Language is a popular language to create the best conditions for developers to unleash their full potential. I support popular programming languages like you mentioned above. The use of new programming languages and jargon will only complicate developers. They need to be proficient in those languages because otherwise when there is an error in the blockchain, the consequences will be huge and take a long time to fix.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
I think this belongs in the Dev & Tech board.


Bitcoin is written in C++.
Ethereum is written in Go and C.
Cardano is written in Haskell and Nix.
Polkadot is written in Rust.

As you may see, there's no standard programming language for cryptocurrencies and I could keep mentioning some other altcoins with less market cap. The programming languages are all fine if you know how to work on them.

The question is why Charles used Haskell for Cardano, what does Haskell has that other programming languages don't?
It's probably what Charles knows better.

Can the same be said about Crypto blockchains?
This can be said for anything that hasn't be written properly. The programmers must be very determinant when they code. Confused writeups may bring confusion to the ones who'll have to read the code.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
This is basically a duplicate of What do you look for in a programming language made for decentralized projects? and probably many older topics on this forum as well. I would highly recommend using the search feature before opening duplicate topics.
sr. member
Activity: 1056
Merit: 270
What programming language Satoshi used to create Bitcoin?

These are the most popular programming languages today:

- C
- C++
- Java
- JavaScript
- Python

These are the different types of programming languages:

- Procedural Programming Language
- Functional Programming Language
- Scripting Programming Language
- Logic Programming Language
- Object-Oriented Programming Language

Which type Bitcoin falls under?


So which type of programming language and which programming language is easiest for Debugging for Security Reasons and which one is the most hardware resource efficient/fastest to run?

I keep hearing that there's not that much apps released on Cardano because it uses a unpopular programming language called Haskell that most crypto app developers are not use to using hence lack of applications deployed on Cardano.

The question is why Charles used Haskell for Cardano, what does Haskell has that other programming languages don't? Potential for more powerful complex smart contracts in compared to Ethereum? If so will crypto app developers see this as worth it to invest their money and time resources into Haskell?

I remember the console wars Playstation 3 vs Xbox 360 were games released on Xbox 360 run better because the system was easier to develop for while the PS3 was difficult to develop for even though it had a more powerful complex architecture but that lead to higher development budgets and more time required for developers making games on the PS3.

Can the same be said about Crypto blockchains?
Jump to: