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.
Why I Don't Like Golang (2016)
41–50 of 297 posts
Re: Why I Don't Like Golang (2016)
#42Earlier 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?
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)
#43I 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…
Re: Why I Don't Like Golang (2016)
#44Does 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…
Re: Why I Don't Like Golang (2016)
#45I 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…
Re: Why I Don't Like Golang (2016)
#46For 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)
#47Earlier 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.
Re: Why I Don't Like Golang (2016)
#48Re: Why I Don't Like Golang (2016)
#49I'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.
Re: Why I Don't Like Golang (2016)
#50Earlier 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.