Author Topic: Why does ZooBC blockchain use the Go programming language?  (Read 323 times)

Offline ZooBC

  • BCZ Admin
  • ZooBC Active Member
  • *****
  • Posts: 80
  • Participation: +2/-0
  • The supreme admin
Why does ZooBC blockchain use the Go programming language?
« on: September 21, 2019, 02:59:08 pm »
Why does ZooBC blockchain use the Go programming language?


@capodieci and @pkusuma explain this to us

Choosing a programming language is an important consideration when developing a new blockchain. We decided to launch with proven language call Golang. Golang has been used for various other blockchain projects and it was developed by Google which lends credibility. As Roberto (Founder & CEO) and Putu (Tech Associate) explain the video, our long term vision is a network made up of many different programming languages run on different hardware setups. A diverse ecosystem will make our blockchain more resilient to attack.

Offline louiscaesar23

  • ZooBC Newbie
  • Posts: 2
  • Participation: +0/-0
  • from kenya with love
Re: Why does ZooBC blockchain use the Go programming language?
« Reply #1 on: September 23, 2019, 01:31:57 pm »
I believe that that are deleted the try catch because are really really more heavy then an if, in c++ it is alwayse a good practice avoid try catch when you have time constraint ( really common in c++ application)

any thought anyone?

Offline bzpython

  • BCZ Admin
  • ZooBC Active Member
  • *****
  • Posts: 49
  • Participation: +1/-0
Re: Why does ZooBC blockchain use the Go programming language?
« Reply #2 on: September 24, 2019, 09:53:42 am »
I believe that that are deleted the try catch because are really really more heavy then an if, in c++ it is alwayse a good practice avoid try catch when you have time constraint ( really common in c++ application)

Hi Louis, welcome to ZooBC forum :).

Yes, one thing we like about Golang is the error handling model. Try/Catch is a useful pattern but as you point out it is quite expensive to implement, and Go forces us to structure our code paths in a way that can return an error without invoking it.

A bigger reason involves concurrency. Creating entire CPU threads in C++ or Java is very expensive compared to Golang's "go routines", which can be automatically organized several per thread in such a way that it does not break the concurrency expectations of the application. This makes it much easier for us to structure concurrent tasks without the extra processor overhead and without a lot of manual process juggling.

Arguably languages like Rust or C++ can be even stronger for this, but we prefer to keep the code very clear and simple also. One of our objectives with the project is a readable codebase which can be understood without being a guru of your language of choice, and we think Go is strong in this regard.