Go was developed by a Google team in 2007 to combine the simplicity of Python syntax and semantics with the efficiency of C ++. Although it is not very functional, it is an advanced compiled multithreaded programming language with all the advantages for building distributed systems.
With the execution speed of Go being comparable with C and C++, will it replace these languages in the distinct future? What's your take on it? Please comment your thoughts.
Top comments (23)
No. These discussions always overlook how deeply entrenched C/CPP is in like… stuff. Stuff as in cars, cable boxes, movie projectors, fighter jets, particle colliders… heck Python uses a ton of C under the hood and the internet runs on Nodejs, written in C, running on operating systems written in C. Accessed by browsers written in C. The world runs on it.
Yeah it’s got a lot of problems but when a language is so widely deployed the problems don’t surprise engineers. The capabilities and limitations of the language are known quantities. Sure Ryan Dhal can complain about C and switch to Rust for Deno, but If you’re coding a new missile guidance system do you wanna use a new language that is theoretically better and easier to use, or the one that you’ve spent 20 years getting REALLY good at using for guiding missiles?
I predict that C/CPP will be replaced by a new language around the same time QWERTY keyboards are replaced by a new layout.
Go will die long before C or C++. It is just another fad language. The real benefit of Go will be the features of the language that are adopted and improved upon by C or C++.
While I largely agree with the conclusion, I disagree on the reasoning. There were other OS languages before C and there will be others. Rust for example. That said C has 4 decades of entrenchment. Go fits higher up the stack. It's a good fit for business and proceed work, nowhere precision memory management or very tight system development is needed.
It could be used for some gnu tools or similar, but the overhead of the go runtime would add up to a lot of overhead in space used if they tried to replace all the gnu tools with it.
Rust will not displace C. Rust is just another vendor controlled language that will not stand the test of time. It's legacy will be how it influences C or C++. There is too much investment in C and too much inertia for it to fail. I agree with you in that Go is too expensive in its runtime but Rust will not last either. Better to learn the latest C standard then invest time with Rust.
What vendor is controlling Rust, exactly?
Mozilla. Although it is open-source and much coding is done volenteer, they are the muscle and pocketbook behind it.
Mozilla has let rust be spun off into it's own organization. That has backing from Amazon, Microsoft, Google, Mozilla and others... If those companies are all in agreement on a language, it's in pretty good standing.
No it won't fade out. Google is releasing new features with optimization of build. Many big organisations are migrating from Python, java to Golang.
I don't think so. As far as history goes Go was made to power Google server backend logic. As far as practically goes - it is perfect for what it was made for. Microservices, macroservices, containers - Go is perfect for web-backend. I don't see how people are ever going to stop using the internet. You can build a sturdy chat, websocket connection pool, database connection pool, a que for any type of service you need, gRPC connection between containers and services. I just named all the stuff I and many big companies used for their projects. Docker is also built in Go, so is Traefik, and a bunch of other web-related tools.
That being said - Go is NOT meant to replace C/C++ because those guys are meant to handle embedded, OC, and other things where you need absolute control of the hardware. It is obvious Go is not a replacement for C/C++/Rust with the way it handles memory (an automated garbage collector).
I think it's more likely to replace Java. Especially i considering low level OS development where Go doesn't fit at all. Go may replace some higher level use in the longer term. I don't think there's any good UI sorry as of yet. Rust will probably displace a lot of C/C++ for new development at the systems level, and potentially higher in the stack.
Go is mostly seen in process systems, where it's been largely Java and C# the past couple decades.
From some of the golang developers from google said when it comes to 10000 lines of code of c/c++ its compile time is slow then as golang it is fast.
I'm sorry, I didn't get you. You're saying Golang is faster or slower than C/C++?
in terms of what you are comparing or where you may use it.
c++ is lit bit faster in terms of execution but do not support concurrency
which C++ are you talking about C++20 has coroutines etc C++23 will build on that, as for threads in the old sense I've been using them since C++11
I never used c++ i have googled about it for concurrency then it showed that you have to import library.
i was thinking to use c++ for rest server and app backend server but after compile time, concurrency and library i left that and using golang
that would be the older C++, C++ is a continually moving target
That's something never gonna happen.I think Go is not much potential as Rust when it comes to replacing something related to C/C++ . By saying that C/C++ has an irreplaceable firm position .Which is unchallengebale by any of the languages.
But... Rust replacing some of the C++ stuff is gaining momentum .Believe it or not its such a great language.
Ferrari can't replace Lamborghini
I think Go is a great server-side language and it will shine for backend systems. It already is for that matter. I see it replacing java (may be) but when you say replace, you fail to appreciate the amount of inertia it takes to move years-old code from one language to another. I mean it takes people years to move versions of compilers leave alone languages.
So at the end, my answer is it depends. For newer code, I can see Go making inroads into the traditional java market but most people are not gonna re-write their enterprise code in another language. It's a massive investment of time and money. Secondly, Go is definitely not an alternative to C/C++. When you need pure performance, nothing comes close to C/C++ - except for may be Rust in recent years.
Yes Go can certainly replace C/C++ in many core areas. Golang succeeded initially in the cloud native development and the focus is now moving towards system programming area. To begin, Golang enables embedding of C libraries and is capable of running natively in embedded devices. With builtin buffer overflow protection, automatic memory management, cross compilation to different architectures, Golang produces highly optimal binaries with minimal size. The support for architectures is growing everyday. See gist.github.com/asukakenji/f15ba7e...
With a shallow learning curve, the future generations of programmers would be attracted towards golang. And the cheap availability of standard microprocessor platforms would reduce a lot of development from scratch. However C/C++ would continue for reasons why the Cobol and mainframes continue to exist. Golang has the potential to be the no 1 language if you target efficiency and optimization at any level.
I don’t think it’s fair to compare Go with C++, it’s more like C++ vs Rust
Some comments may only be visible to logged-in visitors. Sign in to view all comments.