Live data from Hacker News

Why I Don't Like Golang (2016)

teamten.com

41–50 of 297 posts

Re: Why I Don't Like Golang (2016)

#41
post #26

Earlier quoted context omitted.

> Isn't this just duck typing? Don't other languages renowned for their type systems do this? It's "structural subtyping", which is the type-safe equivalent of duck typing. It's a feature that allows implementations to exist without needing to know exactly every interface they implement. TFA's concern is purely theoretical. > That's horrifying. append() doesn't operate on arrays, it operates on slices. Arrays are fix…

> append() doesn't operate on arrays, it operates on slices. [...] This is a pretty standard data structure in most languages. If you say so. I know I should go read the docs more carefully, but this whole slice thing is confusing to me, and often yields surprises like this. I'm not a big fan of how this was implemented.

How would you prefer it be implemented?

Re: Why I Don't Like Golang (2016)

#42
post #41

Earlier quoted context omitted.

> append() doesn't operate on arrays, it operates on slices. [...] This is a pretty standard data structure in most languages. If you say so. I know I should go read the docs more carefully, but this whole slice thing is confusing to me, and often yields surprises like this. I'm not a big fan of how this was implemented.

How would you prefer it be implemented?

I don't know, I'll go and read up on it more.

The feature leaves me 'meh'. I don't find slices as awesome as everyone is always saying, especially without negative indices.

I guess part of it it that it isn't always clear to me when you're dealing with a slice, or an array, or whatever.

I know, when it's confusing, there's always some reasonable sounding explanation after the fact, sure, but the whole thing feels like a confusing mess.

Re: Why I Don't Like Golang (2016)

#43

I have been using Go in production since 2015 and can honestly say that other than the ternary operator, none of these have been a major issue for me. Granted, I am doing mostly REST API development so my use cases may be different, but I have never had an issue with capitalization or which interfaces are implemented. The tooling is by far some of the best I have used in a language. Paired with a good editor (I perso…

That's really interesting. How do you use Go with Elixir? I've never really gotten into Go, partially because I feel like there's a lot of overlap with what it does and what Elixir does. I could see using it for CLIs and various Unix scripting, but I've been doing that with Ruby, for the most part. I also considered learning Go for creating some native binaries for a few critical paths, but Rust seems like the best c…

For one Elixir is very slow compare to Go.

Re: Why I Don't Like Golang (2016)

#44

Does anyone remember reading K&R for the first time? To me seemed like C was such a tight, perfect little design. Only thirty keywords, and simple consistent semantics.¹ When I first learned it, it was still pre ANSI, and you declared a function like this int f(a) char *a { } The ANSI style function declaration was maybe the only innovation that came after that that significantly improved the language. I remember in…

I just started digging into C a few years ago and was struck by the same. It's amazingly simple and the only "flaw" that leaps out at me is the precedence of & and | being higher than comparison operators. Other than that, and maybe the macro system, everything frustrating about learning it was due to the frustration of dealing with the machine rather than anything C itself imposed on me.

Re: Why I Don't Like Golang (2016)

#45

I have been using Go in production since 2015 and can honestly say that other than the ternary operator, none of these have been a major issue for me. Granted, I am doing mostly REST API development so my use cases may be different, but I have never had an issue with capitalization or which interfaces are implemented. The tooling is by far some of the best I have used in a language. Paired with a good editor (I perso…

If you're just writing a REST API, I wonder, why did you choose Go for this instead of Java or Python?

Re: Why I Don't Like Golang (2016)

#46
Go's certainly not perfect but I usually find it more productive than java or C++ for equivalent problems.

For 2, I hate this example. Code that returns or takes booleans that requires reading a comment to understand the value is super error-prone to use. Don't write textually ambiguous interfaces in any language. I just haven't seen this particularly be a problem.

#3 Re: checking errors, we wrote a trivial go vet plugin in house that checks for that.

sort.Slice is probably new since this was written and is way better than sort.Interface if you're sorting a slice.

Better vendoring and generics are finally acknowledged to be issues and solutions are coming. Hooray.

Re: Why I Don't Like Golang (2016)

#47
post #20
post #18

Earlier quoted context omitted.

I keep meaning to check it out :)

I'm still pretty new to it and I've never used Go, but Rust seems to address most if not all of these problems, while serving many of the same original design goals of Go. Probably its biggest disadvantage is the learning curve/iteration speed: it doesn't make it easy to just hack things together, especially when you're first learning.

Yeah, iteration speed is a pretty big blocker for adoption in a lot of domains. Go isn’t perfect, but it lets me get things done today. That said, I appreciate that Rust exists for safety/performance critical domains, and as Rust matures (e.g., as it’s async story solidifies and consensus emerges around various HTTP libraries, etc), it will be more competitive for general purpose application development. But I suspect there will always be a significant productivity gap.

Re: Why I Don't Like Golang (2016)

#48
post #28

Earlier quoted context omitted.

you make it sound like Go is not top tier in the 2019's programming landscape and there is a good alternative. Can you elaborate?

Yes it's called Java.

Maybe so, but please don't post unsubstantive comments here.

Re: Why I Don't Like Golang (2016)

#49
post #7

I'm surprised that someone can use Go for 3 years and still be hung up on the things that most people appear to get over in the first month.

If you get a pebble stuck in your shoe, you can usually get over it within a couple minutes, and start to ignore the minor annoyance. But if it stays there all day, it could eventually get pretty painful. It all depends on how much walking you do.

And to the parent’s point, most people simply learn to remove the pebble in the first month. ;)

Re: Why I Don't Like Golang (2016)

#50
post #43

Earlier quoted context omitted.

That's really interesting. How do you use Go with Elixir? I've never really gotten into Go, partially because I feel like there's a lot of overlap with what it does and what Elixir does. I could see using it for CLIs and various Unix scripting, but I've been doing that with Ruby, for the most part. I also considered learning Go for creating some native binaries for a few critical paths, but Rust seems like the best c…

For one Elixir is very slow compare to Go.

For what purpose? See: https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixi...
Post reply on HN