Live data from Hacker News

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

news.ycombinator.com

301–310 of 310 posts

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

#301
post #290
post #221

Earlier quoted context omitted.

If Go survives, it will end up as complicated as other languages. Rust, too, if it survives. You have to be arrogant to design a language and expect it to go anywhere, so you also tend to think you know better than everybody else, and that nobody has anything to teach you. It's an occupational hazard. Designing a language you don't mean to use yourself manufactures special failings. Rust's designers started with unus…

People who enjoy Go will probably tell you that Rust is already one of those complicated languages. Personally I don’t agree, I think Rust is right in the middle, but that’s because to the left of Rust is Idris, Agda, Coq, Ada and Prolog. Most SEs don’t have those on their radar.

They are on my radar but I’m unlikely to steer my sub in that direction as I don’t have the time!

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

#302
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.

I did not like it at first but now I kind of got used to it. It makes errors very explicit. Other language alternative is wrapping in try catch block. Wrapping everything statement which can produce error is more tedious.

There are other alternatives as well. For example, Rust uses a Result tagged union. You can also shorthand it using the ? operator, which does the same as the if err != nil { return nil, err; } but without all the boilerplate. There are some inconveniences, like needing to specify the error type by hand, but overall the amount of code is far smaller, it is a lot harder to mess up return types, yet it remains equally explicit in forcing you to handle every error, which is something that Go doesn't do.

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

#303
post #300

Earlier quoted context omitted.

> You seem to be writing that a simple language is somehow harder to scale for large teams. My experience is the exact opposite - too expressive language make devs have different dialects and be too "clever" for the teams long-term good - and I'm pretty dumbfounded that you can try to make sense of that. It doesn't matter what language you use - cleverness will come in anyways. Only the way it is achieved is differen…

I don't agree that dense code is easier to understand at all. It's both harder to understand and much harder to debug. I don't now why more code is in anyway reflective of how hard it is to understand. That would make the Redis code base harder to understand just because it has more features now than 4 years ago. That's just not true. Haskell is also a good example, if it was easy to understand, maintain etc. we woul…

> I don't agree that dense code is easier to understand at all.

I think we just have a different definition of dense code. Here is an example that shows my view on it.

Dense: adult_users = users.filter(it.isAdult) Not dense: adult_users = list.empty for(i = 0; i The first example is not only just "less" code in the sense that the filter function was also defined somewhere before and then just used. No, it is more dense code because it reduces subjective complexity by shifting some of the complexity to existing code _with which the developer hopefully is familiar with_. If the developer is not familiar with it, then the code is actually _more complicated_.

The same thing happens to language features, not only to code reuse. Some languages have generics, some don't. Without understanding and familiarity with generics, they will make everything more difficult. Once they are understood, the developer has a productivity advantage (assuming that generics are helpful).

However, gaining this initial knowledge and familiarity is very hard, hence not so many people use Haskell or similar languages and many more people use javascript and python and php, so you see more large-scale apps written in them. But we also see that all big companies eventually struggle with the not-dense-enough code and build on top of these languages. Facebook with php->hack, stripe with their own version of Ruby, ...

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

#304
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…

This is on point. I would add that successive approximation here is quicker than finding solution on SO.

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

#305

Earlier quoted context omitted.

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.

Simple languages are great, but simple does not necessarily mean less powerful. C is a simple language (albeit with many footguns) and the ecosystem is simple as possible (make and friends, gcc/clang, etc), but it can be extremely difficult.

Swift is a great example of what go could be. It includes a lot of powerful features (e.g. generics, lacking in Go), but the language is designed so that its easy to start without having to learn advanced language features; one can slowly accumulate these more advanced tools as one progresses. Scala is also like this; a lot of Scala code is basically just less verbose Java. This is in stark contrast to languages like Haskell or Rust, which one has to very quickly learn myriad details about things to be productive (e.g. about laziness and the data / typeclass split in Haskell compared to standard OO, or about the borrow checker in Rust). Arguably these "big brain languages for super geniuses" distinguish themselves by these features, but it inherently makes them less simple.

It's certainly a boon to everyone (including "supergeniuses") that Go has its design for the same reason Python has its design: simplicity begets a great ecosystem. I still use Python all the time because despite its mess of packaging, dynamic typing, and painfully slow execution, there are so many great projects. Go also produces great tools that I enjoy every day (e.g. hugo and kubernetes) and I'm thankful that the language enabled folks to write these applications that run super fast and don't crash because some rarely-exercised code path referred to an undefined object attribute.

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

#306

Earlier quoted context omitted.

To me it is a modern C with the lessons from Python learned. It is simple in the ways C is and the gotchas are all things i do naturally based on C. I like having structs and like having to check errors in each call. It forces one to concretize the idea that any reference to anything off of the CPU or the RAM might do anything. You have to have an error strategy for robust code. I don’t think people complain that Lin…

Entirely agreed. I'm relatively new to Go, but it strikes me as very much like a modern C. But, personally, C can get really tedious.

I agree as well. Going from C to Go as still a newcomer to C, I liked that Go seemed to be more "defined". For example that there is one style and doing something like placing a bracket differently results in a syntax error. This is good for newcomers because different styles and philosophies about a language can quickly make one feel lost.

For me, C only seems tedious because to every question I have about it, I will inevitably find 10 different answers, maybe all from different periods of time. And I understand that I can look at the C standard but there are things that it doesn't address. Also, venturing into embedded programming, you can quickly come across implementations of the standard libraries that aren't nearly as well-defined.

So considering these things, I think it is a good "modern C" as long as you don't go too low level.

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

#307

We have a few go web apps to maintain and, honestly it's not a pleasant experience. - Package management is terrible. - Development on Mac is not a great experience (someone in the team purchased a paid IDE, everyone else just run everything through a docker image, are we missing something obvious?). - The language is not flexible enough (lack of generics?) and code is significantly longer. - Lots of quirks. I'm sure…

Since they added go mod I find the dependency management to be ok. And I use emacs so Mac or Linux it is a pleasant experience. You have first class lambdas so you can do pretty much anything in the language that doesn’t depend on syntax. It is a language with the aesthetics of C - small and simple syntax. Things that make the code more verbose, eg error checking, are things C programmers think you should do anyways…

Worth noting that Go Modules are still relatively new (Blog post from March, 2019 - https://blog.golang.org/using-go-modules) so some people in this thread might not be aware of them. I find that dependency management works well enough now.

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

#308

Speaking strictly about the language, and not the platform, I'm skeptical about the lack of more modern core library and language features like immutability, pattern matching, and records. They spent almost 10 years saying "we don't need generics", but now are implementing it Also, the dependency management.

Dependency management is better now with Go Modules. Not as great as e.g. with cargo in the Rust ecosystem but definitely an improvement.

https://blog.golang.org/using-go-modules

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

#310

Earlier quoted context omitted.

For large data sets, it sometimes spends all day in GC while just loading the data into memory (this is actually more of a problem in Ruby than in Python, but it still exists here). It's also not very efficient about using memory, so it can be easier to get a dataset to fit in RAM in Go vs. Python. Python also makes it hard enough to make use of multiple cores that it becomes easier to just use Go. The same goes for…

I’m interested in learning more about Ruby’s garbage collection issues. Could you recommend any resources on this? Or any tools in the Ruby language that would allow me to test this myself?

https://www.joyfulbikeshedding.com/blog/2019-03-14-what-caus... is a pretty interesting resource about this.
Post reply on HN