Bitcoin Forum
December 03, 2021, 08:37:23 PM *
News: Latest Bitcoin Core release: 22.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Programming Languages for Crypto, which is the best?  (Read 138 times)
very_452001
Sr. Member
****
Offline Offline

Activity: 1056
Merit: 270



View Profile
September 25, 2021, 11:41:17 PM
 #1

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?
1638563843
Hero Member
*
Offline Offline

Posts: 1638563843

View Profile Personal Message (Offline)

Ignore
1638563843
Reply with quote  #2

1638563843
Report to moderator
1638563843
Hero Member
*
Offline Offline

Posts: 1638563843

View Profile Personal Message (Offline)

Ignore
1638563843
Reply with quote  #2

1638563843
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1638563843
Hero Member
*
Offline Offline

Posts: 1638563843

View Profile Personal Message (Offline)

Ignore
1638563843
Reply with quote  #2

1638563843
Report to moderator
n0nce
Member
**
Offline Offline

Activity: 112
Merit: 603

scio me nihil scire


View Profile WWW
September 26, 2021, 12:53:26 AM
Merited by BlackHatCoiner (1)
 #2

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.

BlackHatCoiner
Hero Member
*****
Online Online

Activity: 630
Merit: 1851


In maths we're familiar with.


View Profile WWW
September 26, 2021, 07:11:14 AM
 #3

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.

(o)(o)ilikeboobs(o)(o)
Full Member
***
Offline Offline

Activity: 798
Merit: 105



View Profile
September 26, 2021, 05:20:28 PM
 #4

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.

odolvlobo
Legendary
*
Offline Offline

Activity: 3430
Merit: 2093



View Profile
September 26, 2021, 07:01:46 PM
Merited by ETFbitcoin (2), BlackHatCoiner (1)
 #5

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.

Buy stuff on Amazon with BTC or convert Amazon points to BTC here: Purse.io
Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
swogerino
Legendary
*
Offline Offline

Activity: 2268
Merit: 1092



View Profile
September 26, 2021, 07:09:53 PM
 #6

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.

gwdf1
Full Member
***
Offline Offline

Activity: 665
Merit: 103



View Profile
September 27, 2021, 03:21:11 AM
 #7

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.

very_452001
Sr. Member
****
Offline Offline

Activity: 1056
Merit: 270



View Profile
September 27, 2021, 05:01:29 PM
 #8

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?
n0nce
Member
**
Offline Offline

Activity: 112
Merit: 603

scio me nihil scire


View Profile WWW
September 27, 2021, 05:08:30 PM
 #9

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.

very_452001
Sr. Member
****
Offline Offline

Activity: 1056
Merit: 270



View Profile
September 27, 2021, 05:12:55 PM
Last edit: October 24, 2021, 06:06:02 AM by mprep
 #10

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]
n0nce
Member
**
Offline Offline

Activity: 112
Merit: 603

scio me nihil scire


View Profile WWW
September 27, 2021, 09:46:41 PM
 #11

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.

RussianEnglishTranslation
Jr. Member
*
Offline Offline

Activity: 532
Merit: 5


View Profile
September 28, 2021, 04:55:36 AM
 #12

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.
very_452001
Sr. Member
****
Offline Offline

Activity: 1056
Merit: 270



View Profile
September 28, 2021, 07:31:10 PM
 #13

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?
BlackHatCoiner
Hero Member
*****
Online Online

Activity: 630
Merit: 1851


In maths we're familiar with.


View Profile WWW
September 28, 2021, 08:11:04 PM
 #14

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.

n0nce
Member
**
Offline Offline

Activity: 112
Merit: 603

scio me nihil scire


View Profile WWW
September 28, 2021, 08:47:01 PM
 #15

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.

very_452001
Sr. Member
****
Offline Offline

Activity: 1056
Merit: 270



View Profile
September 28, 2021, 10:45:02 PM
 #16

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?
n0nce
Member
**
Offline Offline

Activity: 112
Merit: 603

scio me nihil scire


View Profile WWW
September 28, 2021, 11:08:13 PM
 #17

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.

Pages: [1]
  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!