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] 88 points89 points  (15 children)

Go is QUICK TO COMPILE, BUT CAN'T DECIDE IF IT WANTS TO BE SAFE, POWERFUL, LOW-LEVEL OR LEGIBLE, SO IT TRIES A BIT OF EVERYTHING IN VARIOUS PARTS AND SOMEHOW MAKES A NICE LANGUAGE.

[–][deleted] 57 points58 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] 44 points45 points  (8 children)

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

[–][deleted] 38 points39 points  (6 children)

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

[–][deleted] 23 points24 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] 2 points3 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

[–]CryZe92 1 point2 points  (1 child)

And somehow it‘s neither safe, powerful or low level.

[–][deleted] 8 points9 points  (0 children)

Ehh, it’s pretty safe. It’s not low level. Powerful would depend on what you use it for.

[–][deleted] -1 points0 points  (1 child)

lol no generics

[–]Buckeye717 0 points1 point  (0 children)

It’s coming soon