Go 101 About, Architecture, Versions, Ecosystem

By pjain      Published July 29, 2019, 1:47 a.m. in blog Programming   

About

Go has pretty good compiler error messages, so having it slap your knuckles a few times helps speed the learning.

  • most people writing articles about Go would try to tag them with "golang" for search-ability ("golang" is also used for all the Go e-mail lists).

Why

Go is a compiled, statically typed language.

Go is designed to have a very basic, but fast language - has less cruft and support in std lang as compared to Py/Rb which are designed to make it easy to get things done for experts.

Go is about quick development of back end services at C/C++ performance levels.

  • Go Gives 3-20x performance in benchmarks vs Python.

Go might need a bit more effort, but over the lifetime of the code that small cost will more than pay for itself by using less resources, scaling better, fewer bugs (simple == fewer defects), stronger standard library (modern features and performant), easier deployments, better debug/perf tooling.

Why not

NOT Dynamic typed - so not that good for quick prototyping or the active-ORMish type reflection like RoR.

NOT scripting language it doesn't have a REPL - where Rb/Py do well.

Go takes a lot more time to develop in than Python.

It would be much more successful if they allowed a bit more syntactic sugar to make code more concise. It’s too opinionated in some ways but curiously missing conventions/guidance for things that impact readability. For example, there is no recommended line length so it’s common to have lines of code that require you to scroll horizontally (a lot!). They recommend/tolerate one-letter variable names (presumably to make things more concise) but why does that matter if we are now writing lines that are 200 characters long?

Use cases - Hi perf WS, BE-servers

Go is a server-side language so seems great for infrastructure, backends, devops, performance, scaling, systems, concurrency, network, databases, servers, CLIs, etc… there are few technical reasons to use Python over Go.

Go is going to be used where its features of performance and concurrency patterns are important. If horizontal scaling is important, Go will be a better choice. It will also do where speed is critical.

NOT for Most Large Web Apps>

In area of web development Python has a massive footprint and its actually growing. Here Go might take some footprint on concurrent/websocket application space, but it's really small piece of the cake. When hottest front-end js framework changes 3 times a week… so consider Nodejs rather than Go.

Popularity

2012 The TIOBE programming community index rates Go as not being in the top fifty languages used today. That seems strange since it was the "language of the year" in 2009.

TIOBE has always been a joke, and only even attempt to manage language chatter, not usage. It is based off job boards and internet search trends, and is highly susceptible to homonym confusion, which is especially harmul in the case of "go".

  • Github, which ranks Go as the 27th most popular language. https://github.com/languages/Go
  • however huge Ruby bias due to history

Perf tips by C integration

If speed is so important that Go isn’t fast enough, Go has an assembler that is processor agnostic (your code still needs to fit in the target) or you can code those sections in C and call them from Go. (There is a robust framework for integrating C code.)

Go vs Python esp 3.6+ Async, Type Annotations

  • Python is well established and has a significant community built up around it. For many applications, Python works well enough. Places where Python will be stronger for years or maybe forever.

Python has massive data science library support. It could take a decade to build similar ecosystem on a another language. Massive uptake of Python in world of finance is only making this stronger.

Python has huge ecosystem of system management and “glue” tools to use it as an automation language. I cannot see any admin would be eager to change the language. And why would they? Python libs do the job well.

There are still many more Python programmers than Go. There are still many more libraries and applications written in Python. With python, you can quickly prototype and develop a solution using the massive standard library or pip.

  • Python 3.6+ is fighting back

    We now have type annotations in python for functions and variables.

If we take out all the runtime implementations, and the library ecosystems and just look at the core language spec and it's standard library, Python is just too powerful, it might very well be the most practically useful and simple language today.

  • Async IO is a killer for Python - that obviates many of old Go and NodeJS benefits

Python - Safe bet for ML. (Anaconda libraries)

Python+ QL (hive/plsql/sql)

Go vs C/C++ - low level calls not so easy from Py/Java

Golang and C++ - If you want to be part of code migration team in Google ( someone from Google can validate).

Python,Golang and Java - Overkill. Any two will do.

Basically, if you learn C++ then you will also become familiar with the Standard C language. And Standard C exists almost 50 years and is still used a lot for operating systems and embedded programming. The C++ language has the best native interface to communicate with C libraries and both languages combined are often used to write compilers for other languages like Golang, Python and even Java.

Eventually for high perf you will want Java, Python and Golang to link with your C++ code, for which both use C-style functions. If you decide to use Java, well… Java has the same problem, only more complex. Java code is platform-independent and compiled Golang is not. That makes it harder to combine both.

CODE GEN OPTIMIZED in C++> Go is a very new language, and C++ has been around for quite some time. Because of this, C++ compilers produce significantly more optimized code than Go compliers, meaning C++ is (usually) faster than Go.[1] As Go compilers improve with time, we can expect to see this gap closing somewhat, but Go most likely won’t ever completely catch up. C++ was designed with performance in mind, and even though it lacks the built-in support for coroutines and concurrency that Go does, libraries can be leveraged to provide this. This speed difference between C++ and Go is usually inconsequential, and the faster development time with Go means it is often a better choice.

Go vs Java

  • Java can perform very well across wide variety of problems .. only avoid GC by obj-pools

Go vs Ruby, PHP

Ruby is an interpreted, dynamically typed language. Perhaps if Go gets some strong web frameworks, like Ruby has, then perhaps it will gain some traction for web apps, but they're really quite different languages.

Ruby quickly wraps a database as a web application in RoR for quick prototyping in a dynamic programming environment. But Go is all about static typing and this is not possible.


8 comments

Comment 1 by yeezy June 5, 2020, 7:45 a.m.

I precisely wanted to thank you so much once again. I do not know what I could possibly have used without these ways contributed by you regarding that subject. It had been a very frightening situation for me, however , being able to see this expert way you managed the issue forced me to leap for gladness. Now i'm grateful for your service and even believe you know what a great job you're undertaking instructing most people by way of your blog post. Most probably you haven't encountered any of us.
yeezy [url=http://www.yeezyshoes.uk]yeezy[/url]

Comment 2 by longchamp June 7, 2020, 8:21 p.m.

I not to mention my friends were found to be taking note of the excellent secrets located on your web blog while all of a sudden I had an awful feeling I never expressed respect to the web site owner for those secrets. Most of the people appeared to be certainly glad to read all of them and have now in actuality been taking advantage of them. Thanks for being considerably considerate and then for pick out this kind of outstanding resources millions of individuals are really desirous to understand about. My personal honest apologies for not saying thanks to sooner.
longchamp

Comment 3 by golden goose June 9, 2020, 10:07 p.m.

I precisely needed to appreciate you again. I'm not certain the things I could possibly have accomplished without the type of information shared by you concerning that subject. This was a very traumatic dilemma in my position, nevertheless considering a expert avenue you processed that took me to jump for contentment. I will be happier for your advice and as well , have high hopes you find out what a great job that you are providing educating many others via your websites. I'm certain you've never met any of us.
golden goose

Comment 4 by nike foamposite June 12, 2020, 10:13 p.m.

Needed to draft you a very small remark just to say thank you the moment again over the nice concepts you have discussed in this case. This has been simply open-handed of you in giving easily all that a number of us might have advertised for an e-book in order to make some money on their own, precisely since you could have tried it if you ever considered necessary. Those good tips also worked to be a easy way to be aware that other people have similar eagerness just like my own to see more on the topic of this condition. I am certain there are many more pleasant opportunities up front for those who read your blog post.
nike foamposite

Comment 5 by kobe byrant shoes June 17, 2020, 9:25 p.m.

I enjoy you because of all of your labor on this blog. Kate really likes setting aside time for investigations and it is simple to grasp why. Most people hear all of the powerful medium you provide rewarding tips by means of the web site and in addition increase participation from others on that concern and my daughter has always been starting to learn a lot of things. Have fun with the rest of the year. You have been carrying out a useful job.
kobe byrant shoes

Comment 6 by nike react June 25, 2020, 4:38 p.m.

My wife and i have been lucky when Chris managed to conclude his survey through your precious recommendations he received out of the web site. It's not at all simplistic just to find yourself giving for free helpful tips some others might have been making money from. We really realize we have you to be grateful to for that. All the illustrations you have made, the easy web site menu, the relationships your site aid to foster - it's all great, and it is aiding our son and the family consider that this content is awesome, which is seriously vital. Thank you for the whole thing!
nike react

Comment 7 by supreme outlet July 1, 2020, 7:54 a.m.

Thank you a lot for providing individuals with a very spectacular opportunity to check tips from this blog. It really is so amazing and as well , jam-packed with a great time for me and my office friends to visit your site at the very least 3 times weekly to read through the latest tips you will have. And definitely, I'm so always motivated considering the very good strategies served by you. Certain 2 ideas in this post are certainly the finest we've ever had.
supreme outlet

Comment 8 by yeezy wave runner 700 July 3, 2020, 8:03 p.m.

I am just writing to let you be aware of of the notable discovery my wife's girl gained reading your web page. She mastered too many details, which include what it is like to possess an excellent helping character to get other individuals very easily fully understand chosen specialized things. You truly exceeded our own desires. Thanks for providing these precious, trusted, revealing as well as cool tips on the topic to Emily.
yeezy wave runner 700

Add new comment

Similar posts

Go Sample Full Apps

Go Quickstart

Go Reference, Cheatsheet

Go Setup Smarts