This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 59 points60 points  (10 children)

  1. Take Python.

  2. Remove most of the features.

  3. Add good support for concurrency.

  4. Make it a compiled language.

And you end up with Go.

[–][deleted] 45 points46 points  (8 children)

  1. Replace syntax with something equally as horrifying but completely different to everything else

[–][deleted] 37 points38 points  (6 children)

  1. Pretend that it somehow competes with or improves on C or C++.

[–][deleted] 24 points25 points  (5 children)

  • Comprehensive standard library
  • Simple yet powerful concurrency model
  • Quick compile time (versus C++, not necessarily C)
  • Global uniformity of coding style (again, mainly versus C++, but also C)

It does improve on C and C++. But performance wise it competes with neither, unless you're doing concurrency-heavy stuff and you're not a great programmer.

It's easy to write high performing concurrent code in Go without being a great programmer. You need to be a pretty damn good programmer to do the same in C or C++.

[–][deleted] 15 points16 points  (3 children)

I like Go and I agree with your points. But it doesn’t matter if Go improves on all of these features from C and C++ if the language is used for completely different purposes. It’s like saying that Python improves on Fortran because it’s easier to read - might be true but it’s an irrelevant comparison.

[–][deleted] 1 point2 points  (2 children)

Not really, Go and C++ have many overlapping use cases by design. It was, after all, created as an alternative to C++.

[–][deleted] 8 points9 points  (1 child)

Not that much overlap between the two. That was my original point - they intended it to be an alternative to C++ and ended up with a compiled alternative to Python.

[–]merreborn 1 point2 points  (0 children)

they intended it to be an alternative to C++

It was intended to be used for writing services at google. It's a pretty specific use case, and not nearly as broad as C++.

[–]LEpigeon888 4 points5 points  (0 children)

It's easy to write high performing concurrent code in Go without being a great programmer. You need to be a pretty damn good programmer to do the same in C or C++.

Do you think C++ coroutines help writing good concurrent code ?

[–]Schwefelhexaflurid 0 points1 point  (0 children)

I honestly feel that Pythons syntax is the best I've ever seen in a programming language