Live data from Hacker News

Why I Don't Like Golang (2016)

teamten.com

101–110 of 237 posts

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

#101
post #5

They'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…

> structs / types not explicitly declaring which interfaces they implement is a real and unaddressed problem

Isn't it a feature? You can have a "writer" as long as it can "write", and then use that writer anywhere where a function expects a writer?

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

#102
post #25

Earlier quoted context omitted.

What's even worse is getting companies to pay for this stuff. Getting a company to buy software to help you do your job is like pulling teeth.

any company will let you expense a few hundred dollars for a tool you use literally every day many hours a day. if you’re having trouble they are not good to work for or you’re asking the wrong way

I concur.

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

#103
post #55

Agreed with the article, though obviously it’s a bit dated (especially around generics and package management). My take is that Go is basically the new Java, with fewer abstractions and faster compilation. Although, the pre-Java 8 Java, before Java started to get a bit functional. Like Java it’s a practical, imperative, statically typed, garbage collected language with very good performance. Also like (pre-Java 8) Ja…

I would really like to see a benchmark on compilation speed. Sure, Go’s compiler is really fast by not doing any fancy optimizations - but.. have you seen javac’s byte code output? It barely does constant propagation, because it can get away with it due to JIT. So if anything, javac just starts up a bit slower, or the build tool does something at first start but otherwise java programs literally compile in a blink of an eye.

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

#104
post #89

Earlier quoted context omitted.

Yes, and it's missing tons of things we take for granted in other langauges. If you look at the "strings" section it's so short. There aren't even convenience things like string reverse.

Odd, I find the standard library very full-fledged and useful, including the strings package. I've almost never needed to reverse a string, except in interviews. :-) The stdlib has a full (and good) HTTP server with HTTP/2 and TLS support, HTML templating, excellent I/O support, compression, even image encoding/decoding and drawing. That said, the container types are pretty sparse, but that may change a bit now that…

The fact that it's a bunch of top level functions also makes me think of PHP from the early 00s, only I was able to do more with things then tbh. Just feels super archaic.

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

#105
post #30

My thoughts on his points, from someone who really likes Go and has used it heavily on small and large projects (1M LoC): 1. Probably a matter of taste, but I love this feature, just because of the lack of noisy public/private keywords everywhere that you see in Java et al. It also means you can tell from a usage (not just the definition) that something is exported, which is often useful. As far as renaming goes, eit…

On point #2:

I don't know anything about Go, but I've spent a lot of time working in a lot of languages. Structural typing is a bad idea. There are a few, limited cases where it's necessary, e.g. we have it in TypeScript because TS ultimately has to work within the limitations of JS. But if you don't have those sorts of limitations, intentionally implementing structural typing in your language is borderline negligent.

Interfaces don't just define a bag of method signatures. Interfaces are semantic, too. An Employee, a Gun, and a ClayPot might all have a method named `fire()`, but they all mean different things. But with structural typing, we can load our Employees into a Kiln and give HR a Gun to downsize the company, and nothing will stop us.

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

#106
post #89

Earlier quoted context omitted.

Yes, and it's missing tons of things we take for granted in other langauges. If you look at the "strings" section it's so short. There aren't even convenience things like string reverse.

Odd, I find the standard library very full-fledged and useful, including the strings package. I've almost never needed to reverse a string, except in interviews. :-) The stdlib has a full (and good) HTTP server with HTTP/2 and TLS support, HTML templating, excellent I/O support, compression, even image encoding/decoding and drawing. That said, the container types are pretty sparse, but that may change a bit now that…

The main thing that irked me though is I had to spend a whole day doing a simple "take this complex object and use it as a hash key" in an idiomatic way other than just cheating and using the stringified version of the object as the key.

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

#107
post #15

> There’s no ternary (?:) operator. Every C-like language has had this, and I miss it every day that I program in Go. The language is removing functional idioms right when everyone is agreeing that these are useful. And everyone agreed so hard that it was removed from almost every modern C replacement (Rust, Nim, Zig, Elixir, Kotlin).

This is entirely off topic, but how are Elixir or Kotlin "modern C replacements"? Elixir is built off of Erlang and has influences from Ruby and Clojure, and Kotlin is a replacement for Java. Rust, Nim, Zig, and Go are all fair game in that list, as far as I know being a C replacement is in the mission statement for the creation of all those languages.

I literally don’t understand why so many people believe Go is a C replacement. Like it is by all means in the first camp of managed languages with a huge runtime.

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

#108
post #63
post #7

Earlier quoted context omitted.

When developers who usually make 6 figures of money complain about $90/yr IDE price I just cannot help laugh. Actually it's even better... the price elevators down from $90 -> year2 90 - 20% -> year3 90 - 40%. Over three years that's like $150-$200 total and it will save you so many headaches. But that's a steep price? Are you kidding? Why do developers hate tools that cost money when they save them time and allow th…

Pretty simple for me: I like working with Free and Open software much more than proprietary software. I think it's important for society, and I have more fun that way too! Also the payoff for me has been very good, I can learn emacs once and enjoy using it for the rest of my life for all significant written language tasks on a computer. Perhaps I could be a little more efficient if I were using a jetbrains IDE, but t…

This argument is not convincing to me, especially considering JetBrains publishes their IDE base as open source.

Everytime I have to use VSC to develop typescript and angular, I am having problems with finding definitions (works 30% of the time), code search (it takes longer due to the constricted interface), git operations (want to do more than a simple pull and push? good luck), and much more. WebStorm on the other hand has a lot less bugs, a more flexible interface, and more features. I am glad that people make an effort to make an IDE instead of an editor with IDE-style features and I'll gladly pay a very small amount of my salary to them.

Every workshop has higher costs than a software developer. Imagine a car mechanic propping up a car with 2 by 4 because they use what's available for free. No, they buy their $30,000 lift because they need it to get their work done quicker.

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

#109
post #5

They'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…

It's not great, but I use this pattern to check / enforce interface membership.

  type Bar interface {
     BarMethod(int, int) int
  }

  type Foo struct {}

  // Error: Foo does not implement Bar (missing method BarMethod)
  var _fooImplementsBar Bar = Foo{}

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

#110

Earlier quoted context omitted.

Musicians and carpenters make far less than programmers, but they still buy their tools. Software people are too entitled. Even if you are not professional, you can still afford 54c a day ($200 a year). Even a programmer in India can.

Many junior developers in my city make around $300 a month. After spending $200 on rent and most of the rest on food, you're not left with much. I understand nobody really cares about crap-holes like mine when they're making most of their money in Western Europe and North America, so just throwing it out there.

Fair enough, but what's the revenue per dev in your org then? Surely it's a bit more than $300/months.
Post reply on HN