Earlier quoted context omitted.
Yeah, "If I do in , and it doesn't work how I like, I don't think it's good"
Naming a file is an obscure thing?
Why I Don't Like Golang (2016)
141–150 of 237 posts
Re: Why I Don't Like Golang (2016)
#142Earlier 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.
Re: Why I Don't Like Golang (2016)
#143Earlier 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.
Yeah if I can have decent pattern matching I can live without some other syntax sugars.
Re: Why I Don't Like Golang (2016)
#144Re: Why I Don't Like Golang (2016)
#145Earlier quoted context omitted.
If “pre-historic” means “doesn't take several minutes to start and require 8GB of RAM”, I guess that's a good thing.
I wonder how Turbo Pascal IDE managed to fit into 640 KB....
Re: Why I Don't Like Golang (2016)
#146Earlier quoted context omitted.
"IDE as tool for everything" is what's prehistoric, at this point.
Sure, some people enjoy being stuck with workflows born out of phosphor terminals.
Re: Why I Don't Like Golang (2016)
#147They'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…
Alan Donovan's guru tool could do this, but it kind of broke with modules and it was never updated and deprecated in favour of gopls. I don't know if gopls added this yet (I never really found a use for it).
I don't think it's very hard to write a tool for this though; parsing Go code is fairly easy and the stdlib provides a decent API for it. I think you could have a functional tool in a day if you wanted to, although without any caching it might be a little bit slow on larger code bases.
Re: Why I Don't Like Golang (2016)
#148I'm still baffled by their decision around date formatting. https://www.godateformat.com/
Re: Why I Don't Like Golang (2016)
#149Earlier quoted context omitted.
True. In Kotlin you can go val foo = if (bar) "this" else "that" and you don't need two separate assignments.
For comparison, in Go it would be: foo := func() string { if bar { return "this" } return "that" }()
foo := "that"
if bar {
foo = "that"
}
Unless the assignment of "foo" is expensive, then you'd assign it in an else.If you really want to, you can do it in a single line too:
foo := map[bool]string{true: "this", false: "that"}[bar]