(Please, don't start a religious war on programming languages. We are all grown ups)
(Please, don't start a religious war on programming languages. We are all grown ups)
Both C++ and python are rather fully featured languages, while the design of Go seems to aim for more simplicity and quality of implementation which affords a great developer UX. In this sense, Go is a step back from the complexity of both C++ and python.
Go for me feels more like an updated and slightly higher-level C for application or webserver programming than any sort of alternative for C++.
Go is statically compiled into a statically linked executable. Go has structs as complex types. They are handled by value, unless you specifically use pointers. Structs can contain other structs as values, without requiring the indirection and the overhead of references. The same applies for arrays. You can have methods on any type, including structs, but you can also just have functions.
So it has a scanner like Java or C#, but you’d get laughed at iterating bytes not objects in Java.
I’d also note Golang’s API is built for enterprises so it’s familiar by design.
I’d enjoy to hear other perspectives.
Yes
Ultimately, I think the right choice comes down to identifying what exactly your dissatisfaction with C++ is.
Disclaimer: I'm a huge fan of Rust and not much of a fan of Go, but I do have experience writing each of them, and I tried to focus on the positives of each language as they might appeal to the parent commenter
I would also suggest trying Python itself (why not go all the way?). Personally I write quick hacks in Python and real code in C++, and find Go to be an interesting middle ground. Python will do more to stretch your idea of programming. Maybe someday Go will get numpy and tensorflow.
Many computations contain other functions, but the four arithmetic operations are very familiar and look godawful as add(multiply(5, 2), 7) instead of 5*2+7. All of linear algebra is aritmetics, as a prime example
Also C++ did not stand still and even the compile times are slowly becoming a thing of the past, with incremental compiler and linking, and modules support.
Maybe if Go 2.0 gets done right, it gets another look from us.
Since Go is easier to learn, it probably couldn't hurt to learn it, then turn to Rust if it's not powerful enough for your use case.
It isn't quite as complex as C++, but has more meat to it than C.
If you really know C++, then you know it's easy to write safe C++ code with the latest standards so I'm not sure what's your problem here. Go and Rust brings very little to the table for an experienced C++ developer IMHO. Stick to the latest C++ features and you'll write "slightly less low-level code", although it's debatable how level C++ is to begin with.
If you are building an OS, game engine, database server or doing embedded programming where the gc is a problem, or if you need a memory/type safe program (at the expense of a bit of productivity), then use Rust.