Go Language vs C/C++

I have spent several days on Go.

It is a little more similar to C, not C++. As it has no class concept, only structure.  Also it has pointer ( but no pointer arithmetic), interface. Also it has slice, map, go routine( for multi-thread) which make it unique. Overall it is could be a good language.

Here are useful commands:

go run your.go, go build your.go, go test, go env , go help, godoc pkgname functionName

 

Compare to C/C++, Ruby, Python, PHP

https://commandcenter.blogspot.se/2012/06/less-is-exponentially-more.html was written several years ago, I still think it is quite true regarding Go and C/C++

 

Python and Ruby programmers come to Go because they don’t have to surrender much expressiveness, but gain performance and get to play with concurrency.

C++ programmers don’t come to Go because they have fought hard to gain exquisite control of their programming domain, and don’t want to surrender any of it. To them, software isn’t just about getting the job done, it’s about doing it a certain way.

The issue, then, is that Go’s success would contradict their world view.

And we should have realized that from the beginning. People who are excited about C++11’s new features are not going to care about a language that has so much less.  Even if, in the end, it offers so much more.

 

References

https://www.golang-book.com/books/intro

https://tour.golang.org/concurrency/1

https://golang.org/doc/effective_go.html

http://spaces-vs-tabs.com/4-weeks-of-golang-the-good-the-bad-and-the-ugly/

https://commandcenter.blogspot.se/2012/06/less-is-exponentially-more.html

 

Please rate this


Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>