Live data from Hacker News

Why Go is my favorite programming language

michael.stapelberg.de

131–140 of 256 posts

Re: Why Go is my favorite programming language

#131

> There is a cost to introducing an abstraction layer. Go code is usually rather clear, at the cost of being a bit repetitive at times. Go programmers say this a lot and every time I see it I wince. We've had all sorts of flights of fashion and fancy in the programming world, but one observation has emerged that seems closer to fact every time we test it: more code is more bugs. The more code you write, the more chan…

I love the error handling in Go. Every other language I've used led to the inevitable and useless "An error was encountered" message.

Go is the first language where I can actually access the original socket permission error because it was actually passed up.

Re: Why Go is my favorite programming language

#132

> There is a cost to introducing an abstraction layer. Go code is usually rather clear, at the cost of being a bit repetitive at times. Go programmers say this a lot and every time I see it I wince. We've had all sorts of flights of fashion and fancy in the programming world, but one observation has emerged that seems closer to fact every time we test it: more code is more bugs. The more code you write, the more chan…

I love the error handling in Go. Every other language I've used led to the inevitable and useless "An error was encountered" message. Go is the first language where I can actually access the original socket permission error because it was actually passed up.

You just described exceptions.

Re: Why Go is my favorite programming language

#133

Earlier quoted context omitted.

> Go, with its lack of complicated mechanics targets the middle of the bell curve. No, it targets the less experienced - interns, as the language creators said.

I don't think Go targets the less experienced. Could you provide a resource, where the language creators have stated that Go targets interns? Go is a safe programming language, but it is not simple. Go has very rigid rules. I don't see any difference in complexity between programming in C and programming in Golang. Programming in Golang may even be harder than C. If you format your code wrong, Golang screams at you.…

The compiler complaining when you do things wrong makes it much easier than C to write correct programs, if anything.

Re: Why Go is my favorite programming language

#134
post #63

What would convince an avid Python user to switch to Go st this point? Let’s narrow down the scope to an API backend to be more specific (isn’t that’s where Go’s performance thrives?)

I was an avid Python user for roughly a decade, and I switched to Go. IME, writing it feels a lot like writing Python, but I feel much more confident that the code I write will run the way I expect.

Re: Why Go is my favorite programming language

#135

> There is a cost to introducing an abstraction layer. Go code is usually rather clear, at the cost of being a bit repetitive at times. Go programmers say this a lot and every time I see it I wince. We've had all sorts of flights of fashion and fancy in the programming world, but one observation has emerged that seems closer to fact every time we test it: more code is more bugs. The more code you write, the more chan…

I love the error handling in Go. Every other language I've used led to the inevitable and useless "An error was encountered" message. Go is the first language where I can actually access the original socket permission error because it was actually passed up.

> Every other language I've used led to the inevitable and useless "An error was encountered" message.

I can't think of a single language except C where this has been a problem for me. What are you referring to?

Re: Why Go is my favorite programming language

#136

Earlier quoted context omitted.

Ultimately, programmers fall in a bell curve. Most languages which benefit extensively from that research target people on the right of that bell curve. Go, with its lack of complicated mechanics targets the middle of the bell curve. I don't have the luxury of working exclusively with people on the far right of the bell curve, so I'll end up picking Go with its simplicity for most projects. I can be assured that almo…

Can testify that other people do limit the tools you can use. I was on a project that I couldn't use even use interfaces, streams, classes, or generics because the other programmer was incapable of understanding how they worked. I eventually just switched to a tool that did the work we were working on to solve the problem without programming because that guy despite having a masters degree in CS and ton of certificat…

> ton of certifications

That gave it away.

Re: Why Go is my favorite programming language

#137
post #70

Earlier quoted context omitted.

Sadly, it ends up far more verbose than Java when you have (as I did after trying to port a project from java to go) over 200 copies of the same observable, sorted, copy-on-write set implementation, because Go doesn’t have generics. And then you change one thing in one place, and gotta change it everywhere again. No thanks.

Surely you could have used interfaces for this case, no?

And how do I get the same type out that I put in? I'd end up with Java 1 style programming, no generics, and having to cast atuff from Object/interface{} everywhere.

interface{} is like Object, if it even exists once in your code, it's broken.

Re: Why Go is my favorite programming language

#139
post #55

Earlier quoted context omitted.

Our industry is hugely based on illusions and misconceptions. There are only few places on earth where people regularly rebuild the skyscrapers to build taller ones. The IT industry simply forces you to re-learn the same old paradigms in a new package just to gain 0.1% of something we cannot even define as an improvement.

One thing I've been looking at lately is the various strands of engineering (civil, electrical, mechanical). I've been looking for common threads and general principles that apply to software engineering that otherwise haven't been. A part of what inspired that search is what you discuss: a huge amount of rework. Tools that shift like sand dunes. Many principles and best practice based on "this is what worked for us"…

Maybe the other engineers would love to be able to do more rework, but since they deal with hardware, changing things is a lot more expensive. Why do you think that their ways are superior? Construction projects too run way over budget and sometimes even fail, just like software.

Re: Why Go is my favorite programming language

#140

> There is a cost to introducing an abstraction layer. Go code is usually rather clear, at the cost of being a bit repetitive at times. Go programmers say this a lot and every time I see it I wince. We've had all sorts of flights of fashion and fancy in the programming world, but one observation has emerged that seems closer to fact every time we test it: more code is more bugs. The more code you write, the more chan…

Regarding your last paragraph, it's a reflection of the state of the industry. The vast majority of "software engineers"/"full stack developers" can't be bothered to learn new skills or improve their existing ones, so any popular programming tool is stuck catering to the least common denominator. Do you carefully review your own code? Do you voluntarily learn any new skill beyond "blog post intro tutorial" level? Do…

> Do you carefully review your own code?

Do you have any resources for getting better at this? I don't get a lot of chances for other people to review what I write (yeah believe me I know..) and am looking into better ways to make sure I don't release shit.

I have a decent amount of testing automated for a majority of my projects but that's turning into an extra job on-top of my already demanding job.

Post reply on HN