• Welcome to ZooBC Forum - ADVANCING BLOCKCHAIN TECHNOLOGY - by Blockchain Zoo.

Why does ZooBC blockchain use the Go programming language?

Started by ZooBC, September 21, 2019, 02:59:08 PM

Previous topic - Next topic

ZooBC

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.

louiscaesar23

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?

bzpython

Quote from: louiscaesar23 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)

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.