Earlier quoted context omitted.
I'm not paying that much for an editor that runs counter to my muscle memory, just so I can use a different programming language. If a language requires some IDE to make it usable, then I put it in the same camp as Java: Hope the competition are using it.
No wonder FOSS languages are stuck in the pre-historic tooling.
Why I Don't Like Golang (2016)
131–140 of 237 posts
Re: Why I Don't Like Golang (2016)
#132I’d like to get into go but in the past I’ve always been burned by not being able to quickly refactor my code. If I want to change the contract of get_kittens so that it returns a set instead of a list, I found it quite tiresome to then go to all the call sites of get_kittens and change their types to match. What was I doing wrong?* Perhaps there’s a cleverer tool out there that can infer and implement these type cha…
Re: Why I Don't Like Golang (2016)
#133They've fixed the import / modules situation to a point where it's usable and much improved, and generics have been added. However, the issue this brings up about structs / types not explicitly declaring which interfaces they implement is a real and unaddressed problem, especially in large codebases. The only tool that I'm aware of that finds implementations is GoLand, at steep JetBrains prices. Figuring out what typ…
So are you trying to find implemented interfaces or interfaces' implementors?
Former: In Vim I can use `:GoImplements`, which internally calls `guru` I guess.
Latter: `gopls` supports this.
I agree it's still a pain that one can not tell directly from code what interfaces a struct implements tho.
Re: Why I Don't Like Golang (2016)
#134Earlier quoted context omitted.
Rust has if/else (ternary) and match (N-ary) expressions, so it doesn't need a separate ternary operator. All of the other “C replacements” listed (which are a weird list for that description, especially Elixir, but whatever) have at least if/else-expressions, which, again, are ternaries.
True. In Kotlin you can go val foo = if (bar) "this" else "that" and you don't need two separate assignments.
foo := func() string {
if bar { return "this" }
return "that"
}()Re: Why I Don't Like Golang (2016)
#135I just leave this here: https://github.com/golang/go/issues/49383 After such public disregard to the communnity and contributors as a whole, the talk about good or bad has no meaning until they learn the basics. For example how to work with community, and the fact that you have to provide your phone number in order to fix urgent bug or implement some feature is a plain stupid(or rather malicious). Just imagine you've…
Re: Why I Don't Like Golang (2016)
#136I’d like to get into go but in the past I’ve always been burned by not being able to quickly refactor my code. If I want to change the contract of get_kittens so that it returns a set instead of a list, I found it quite tiresome to then go to all the call sites of get_kittens and change their types to match. What was I doing wrong?* Perhaps there’s a cleverer tool out there that can infer and implement these type cha…
1. Use `:=` whenever you can, so types are inferred by the assignments/allocations 2. Alternatively query all references from `gopls` and put the results into quick fix list, then `:cdo`
Re: Why I Don't Like Golang (2016)
#137Earlier quoted context omitted.
This isn’t true. Go has a basic standard package list. https://pkg.go.dev/std
Another big area that is lacking is Go makes it so hard if you want to use something other than a primitive as a hash key (Rust is guilty of this as well, mind you). This is something that should come out of the box in any modern language in my opinion.
#[derive(Hash)] struct X{ ... }
Seems easy enough to me? The only annoyance is if a third party type didn't implement Hash, but you can solve that with a manual implementation instead of a derive.
Re: Why I Don't Like Golang (2016)
#138Re: Why I Don't Like Golang (2016)
#139Re: Why I Don't Like Golang (2016)
#140Why isn't Go good for large projects? Kubernetes is an example of a huge project built in Go