Live data from Hacker News

Ask HN: Go programming language is over ten years old. What do you think of it?

news.ycombinator.com

261–270 of 310 posts

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#261

Earlier quoted context omitted.

And for me having worked in both, errors as return values have been hands down better. The complexity added by an entirely different flow control has resulted in far more bugs for me to track down than anything else. Similarly, it's for good reason that there's a whole other class of languages using things like the Result monad over throwing up all over everything. That's not to say that there isn't better code writt…

I'm pretty sure exceptions are better, for a couple of reasons. The first is that the idea all Go programmers reliably propagate or wrap error codes, without losing important context, is not true. One of my first encounters with a serious Go codebase was at a consulting client, where I had a task to use their API. I sent it some input and got back a 500 Internal Server Error, no other info. OK, not ideal, but it was…

I agree with you on the stacktrace. The libraries that provide context via wrapping are good but woefully underused.

> Error handling in Go is tedious and there's no visible indication if you forget to do it or don't do it properly so sometimes it goes AWOL

This is also true, though I would expect teams to fail on linting so I don't share the concern. Is there an equivalent for unchecked exceptions (honest question)?

I'll take your word on the performance being better for exceptions, but I'm less convinced that Go's performance is a significant sticking point for the language.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#262
post #22

My fingers are getting real tired from typing if err != nil all the damn time. I do like it for small things - compiling to one (albeit huge) binary and its relative speediness is nice. I wouldn't use it for large systems though. The amount of code really balloons over time, relative to, say, python and that SLOC correlates to bugs and maintenance cost.

Curious, what's your definition of a large system?

My tolerance would be about the 2000 line level.

That isn't the point where I'd consider it non maintainable or anything, it's just the point where I'd probably consider the trade offs less worthwhile.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#263
post #257

Earlier quoted context omitted.

Interesting. I currently maintain 2 repositories, 20k and 60k LOC, and I consider both applications fairly small as it's super easy to cruise its modules/files. In my books, a large system is probably around 500k LOC and I'm curious how that'd work with Go. It's all about project structure and organization of packages. A single file with 3k LOC is most likely unmanageable. 20 files with 150 LOC each is also not much…

I work on a program that is 100+ KLOC. It's quite atrocious honestly. I can't help but think that if it were written in Java, it would have been much shorter, probably at least 50% if not even more.

Can you go into more detail about how java would make the program shorter?

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#264
post #196

Its a great programming language that is helpful to solve problems without wasting time. I really appreciate the simplicity, I think it totally makes sense at work where not everyone wants to deal with weird code. I think maintaining old golang code will not be a major problem in the future for example. The garbage collector make things a lot simpler too. The dependencies management is not great compared to npm/crate…

Go is carefully designed to be adequate for the large majority of problems that don't need much, meant for use by the large majority of programmers who don't know or need much, whose attention is elsewhere. It is hard to get too deep into the weeds by accident. It builds fast, so programmers who code by successive approximation, making more or less random changes until something works can get there quickly. It runs p…

> so programmers who code by successive approximation, ...

> making more or less random changes until something works can get there quickly.

???

First clause doesn't logically match second.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#265
post #257

Earlier quoted context omitted.

I work on a program that is 100+ KLOC. It's quite atrocious honestly. I can't help but think that if it were written in Java, it would have been much shorter, probably at least 50% if not even more.

Can you go into more detail about how java would make the program shorter?

Some examples:

* Exceptions for error handling

* Streams (map/filter/etc.)

* Generics

* Superior collections library (Set, ConcurrentHashMap, LinkedHashMap, etc.)

* Records

* Enums

* Upcoming feature: pattern matching

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#266
post #234
post #213

Earlier quoted context omitted.

Java's place in data processing is as secure as COBOL's. Go's is not. But, as with COBOL, it is not because Java is good, or getting better. It is because--like COBOL, FORTRAN, C, C++, Javascript and Python, and unlike Pascal, Ada, PL/I and myriad others--Java got a miracle. Absent a miracle, languages fade away.

Java is getting better. It's getting records, value types, and green threads, and pattern matching, and more.

Doesn't matter, just as it doesn't matter if it is good. Its secure place in the programming landscape does not depend on its improvements, or even on whether they really are improvements.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#267
post #235

Earlier quoted context omitted.

I never understood why people are looking for things which are boring and I think it is mostly employers who do. They should look for something which is good and solves their problems. I don't know how something with the attribute boring is of interest here as other attributes for a technology/PL might be much more important... Actually they mean something different with "boring": It is just a lack of courage for sim…

> we are scared of specialists and talent and want to stay mediocre This arrogance is just so weird. A High-quality code base is easy to read and change. a.k.a simple. Redis is a good example of this. To have found the perfect abstraction, or perfect feature set fit, for a particular moment in time and feature set, may feel good but doesn't really matter.

> to have found the perfect abstraction, or ...

Didn't even know that I was writing about the perfect abstraction.

Mediocre environments are where you will not find much code of high quality even though every GoF pattern seems to have been applied. That simple code you mention requires professionals and talent. Looking for the perfect abstraction is what you find in mediocre environments.

Redis is actually a good example. It is a highly specialized tool. It might perfectly fit your needs but someone in your company might have defined mysql as boring and Redis to be not... So youl'll use mysql...

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#268

Earlier quoted context omitted.

> I think people complain about Go because it's not the hammer for their nail. Or it's _almost_ the correct hammer! If they'd just fix those damn

It's the correct hammer for a company that employees tons of people who, for the most part, don't really care about the craft of programming and don't want to be bothered by learning anything difficult. They just want to ship their features on time and get their year-end bonus or whatever pat on the head. Even at a company like Google, I don't think most programmers are really pushing their understanding of software…

This is so arrogant. Simplicity of Go is a boon for everyone, including super-geniuses like yourself. Keeping the language and ecosystem as simple as possible means you can operate with lower cognitive load, and devote more of your mind to your current task.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#269
post #208

Earlier quoted context omitted.

A super important principal for large code base is locality. I should be able to look at a function and understand everything about its possible code paths. Exceptions make this impossible (most of my experience with exceptions coming from C++ and Python). People that think like me would forbid exceptions every where.

> I should be able to look at a function and understand everything about its possible code paths. Any golang function can panic, so you always have to account for it anyway.

What? That's patently untrue.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#270
post #246
post #244

Earlier quoted context omitted.

As I wrote, Java is in the process of adding features that mitigate its problems. My post was pointing out a few things where Go is clearly ahead of Java.

Only on support for value types, everything else Java did it first.

You are prolific in your hatred of go
Post reply on HN