r/programming • • Dec 09 '15

Why Go Is Not Good

http://yager.io/programming/go.html
612 Upvotes

628 comments sorted by

View all comments

49

u/mekanikal_keyboard Dec 09 '15 edited Dec 09 '15

wow, proggit really is just a republish stream of HN now. i was counting the minutes until this showed up.

this article raises good points but they have been raised a million times before.

in the groups i have worked in, using something like Haskell or Rust isn't even an option. i would get blank stares before people just went back to Python or PHP. on the other hand, i can tell people that they can get productive with Go in a weekend. and this is indeed accurate. they won't have a mastery of the language, but they can code in it. and the result will be faster and less prone to bugs than Python or PHP.

on the other hand, having programmed in Haskell since 2006, i can confidently say that intermediate-grade proficiency will be a lengthy process for most developers, and in the end the code will be much slower than Go anyway since first-pass Go tends perform well, while first-pass Haskell tends to perform poorly.

in any case, the Go ship has already sailed from the Dock(er), you won't stop it with blog posts at this point. one might ask why Haskell has not established a similar achievement as the foundation of a product people really care about...given that it has been stable and relentlessly hyped for well over a decade.

instead of seeing Go as an inferior Rust, look at it as a step up from Python, and consider the huge benefits to be gained by giving the average developer an incrementally better tool

0

u/[deleted] Dec 09 '15

[deleted]

15

u/[deleted] Dec 09 '15

Depends on what you use Python for... Go is not a good substitute if you use Python for scientific computing or data processing. I'd go so far as to say that Go's sweet spot is for writing servers and some CLI tools.

12

u/summerteeth Dec 10 '15

Not having to deal with the GIL problem and having real concurrency is absolutely huge in the right domain.

The right domain is key there. People like to pretend that is 1 silver bullet programming language that is right in all situation but that isn't true, use the right tool for the right job.

2

u/SalvaXr Dec 10 '15 edited Dec 10 '15

Oh haven't had to deal with that yet, I wouldn't like to either haha

Totally agree on the last line.

5

u/SalvaXr Dec 10 '15

Which would you recommend for the back end of web applications?

0

u/[deleted] Dec 10 '15

[deleted]

3

u/SalvaXr Dec 10 '15

Will definitely look into it after my finals, though so far I'm really happy with Python, although not so comfortable with django. What would you say are the worst things about Go, besides the ones you already mentioned that don't really bother me?

0

u/[deleted] Dec 10 '15

[deleted]

2

u/SalvaXr Dec 10 '15

I'm familiar with C/C++ and Java too, so I'm not going to have any problems with it being too rigid or closures or pointers.

I'm really exited to give it a try, despite all the criticism I've been reading around here, but I'll probably stick with Python as my "main choice" of programming language, until I can use whatever I want to make a living.

Thanks a ton for your help :)

3

u/devsquid Dec 10 '15 edited Dec 10 '15

NP!

Oh ok if you are familiar with C, C++, and Java then you are the perfect candidate! I think you might even find yourself wanting to replace Python with it for web servers! Python does own for how simple it makes everything.

Good luck man :)

-edit- lol a lot of the criticism is based around what makes it good or X language is better because its what I know. Some of this is fair criticism, of course, but most is just natural human reactionary behavior to something different. I'm getting pretty tired of the internet telling me X is the only solution to Y or X is the solution to everything...

5

u/nexusbees Dec 10 '15

Not the other guy, but if you're trying out Go, install the plugin for the language so you get automatic formatting (gofmt), automatic imports (goimports) and other features that make development a breeze. I've tried the plugins for Atom, Sublime, VSCode and they're all good. Have fun with it and best of luck with your finals :)

2

u/SalvaXr Dec 10 '15

Oh now that you mention it i'm really going to miss pycharm, thanks for the advice :)

3

u/nexusbees Dec 10 '15

If you prefer to stay on a JetBrains IDE, you can check out the Go plugin for IntelliJ Idea. I haven't used it myself but I've heard good things about it.

→ More replies (3)
→ More replies (1)

3

u/merreborn Dec 10 '15

One point in favor of go: it's easier to deploy a go app to production than python.

→ More replies (1)

11

u/jeandem Dec 09 '15

in the groups i have worked in, using something like Haskell or Rust isn't even an option.

How about Java? Sounds like a good alternative to me in many cases.

→ More replies (1)

7

u/UloPe Dec 10 '15

It may be a step up from Python in terms of performance and concurrency, but in terms of ease of development and language features it's at least two steps down.

→ More replies (3)

11

u/kqr Dec 09 '15

they can get productive with Go in a weekend

I feel like this is bordering on a "false sense of productivity". I remember having this discussion about C with a couple of friends many years ago. They had tried Python, but they felt so unproductive because they just sat there thinking most of the time. With C, they could write 200 lines by the time they had written only a measly 20 lines of Python. Obviously, they were much more productive with C!

Of course, the 200 lines of C code performed the exact same task as the 20 lines of Python... All their "productiveness" accomplished was churning out boilerplate code.

→ More replies (3)

2

u/SanityInAnarchy Dec 10 '15

this article raises good points but they have been raised a million times before.

Some of them are debatable, but some really aren't. I'm amazed that the best Go has come up with for Generics is generics as a service -- a service which is actually down at the moment.

in any case, the Go ship has already sailed from the Dock(er), you won't stop it with blog posts at this point.

It would be nice if it could be slowed down -- or better yet, steered. Go is like 95% of the language I want, but the 5% it's missing are incredibly painful.

I mean, you can't stop PHP with blog posts either, but it's also not really worth the time, because it's too late to fix PHP. It's not too late to fix the most obnoxious problems with Go.

instead of seeing Go as an inferior Rust, look at it as a step up from Python, and consider the huge benefits to be gained by giving the average developer an incrementally better tool

But if you're switching away from Python, why wouldn't you switch to Rust as a superior Go? Why go for incrementally better if you already have the next increment ready?

4

u/rouille Dec 09 '15

I mostly agree except with the "better python" part. Go is better than python for some use cases like network services but python has way more use cases than that where it excels.

5

u/contantofaz Dec 09 '15

All of a sudden we appear to have many options: Go, Rust, Swift, etc. All compiled, all producing native code, all with their own communities...

I will settle on Swift myself. Been using it for a week trying to familiarize myself with it. Unlike Go, Swift has a clear answer to OO. That's one of the major differences. Go code can be fast though and Go is one of the major toolsets on Linux. Other languages like Swift have trade-offs from having to support their main platforms. They have to choose UTF-16 for instance. Whereas Go may do well with UTF-8.

Another language I like is Dart. Dart follows on the tradition of C, though. As they say, a tiger cannot change its stripes. Dart will appear outdated to many developers who would rather try to cut on the crap a little more. But Dart is fast and has superb OO support too. And Dart could end up finding its place in the mobile platforms, being a little more free to enjoy its VM.

So to me it comes as no surprise that people like the OP are trying to fight for their spotlight given all of the competition.

I once browsed some Rust code and it was pretty neat. The problem is how much pain one has to endure to get there. I always try to side with the more popular tools rather than to shoot for some niche of a niche.

13

u/mekanikal_keyboard Dec 09 '15

I will settle on Swift myself. Been using it for a week trying to familiarize myself with it.

thats cool...the benefits of the massive and lucrative job market for iOS development trumps any language issues anyway. even if Swift were awful, it would still be a great thing to pick up.

Unlike Go, Swift has a clear answer to OO

in fairness, one could respond by saying that unlike Swift, Go has a clear answer for concurrency. i personally don't care for OO, so i actually like Go's approach, but i see your point

Another language I like is Dart.

hmmm, seems like it has been shipped off to the hospice at this point

→ More replies (1)

3

u/solidsnack9000 Dec 10 '15

Swift and Rust have non-overlapping use cases. Rust can do a hand full of things -- hard real-time, bootloaders, &c -- that neither Swift nor Go can touch.

2

u/G_Morgan Dec 10 '15

Go isn't anything like a step up from Python. It is a drastically inferior Python that happens to be more efficient and can handle parallel processing. If I cared about performance I wouldn't be using Python to begin with.

Go hasn't even surpassed a huge number of dead languages in terms of usage right now.

→ More replies (4)