News for hackers. Stuff that matters.
Re:The borrowchecker is what I like the least about Rust by nine_k on Saturday July 19, 2025 @09:04PM (#44620966)
Due to lack of many abstractions, and lack of exceptions, Go is a less concise Java. It's a language where the lack of expressiveness forces you to write simpler code. (Not that it helps too much.)

Go's selling points are different: it takes a weekend to learn, and a week to become productive, it has a well-stocked standard library, it compiles quickly, runs quickly enough, and produces a single self-contained executable.

I would say that Go is mostly a better Modula-2 (with bits of Oberon); it's only better from the language standpoint because now it has type parameters, but GC definitely helps make writing it simpler.

Re:The borrowchecker is what I like the least about Rust by tptacek on Saturday July 19, 2025 @11:58PM (#44621850)
People sometimes say this like it's a dunk, but there's a finite amount of complexity any given programming task can shoulder, you have to allocate it somehow between the programming environment, the problem domain you're working on, and the algorithmic sophistication you bring to bear on that problem, and it's not clear to me what the benefit is in allocating more than you need to your programming language.

A lot of very smart stuff is written in Go by programmers who just want the language to get the hell out of their way. Go is some ways very good at that. Rough though if you want your programming language to model your problem domain or your algorithmic approach! TANSTAAFL.

Re:The borrowchecker is what I like the least about Rust by zozbot234 on Sunday July 20, 2025 @01:24AM (#44622220)
Unfortunately, Golang has a whole lot of weird, pointless quirks in both its base language and standard library, compared to something with a more elegant and from-the-ground-up design, like Rust itself or perhaps OCaml/ReasonML. Not very good news if you want the language to just "get the hell out of your way". I suppose it's still way better than the "enterprise" favored alternative of Java/C# though!
Re:The borrowchecker is what I like the least about Rust by jpc0 on Sunday July 20, 2025 @03:32AM (#44622771)
> Golang has a whole lot of weird, pointless quirks in both its base language and standard library

Having used go in anger I don’t necessarily agree with this, could you point out an example. Maybe I just accepted it and work around it without paying much attention.

If you are referring to interface types being able to be null, well they are allocated on the heap and have dynamic dispatch, this isn’t particularly a surprise if you have worked in a lower level language but might be a surprise if you come from a language where that isn’t the case.

Re:The borrowchecker is what I like the least about Rust by vips7L on Sunday July 20, 2025 @08:45AM (#44624686)
Here’s a great read on its quirks, and where it really isn’t “simple”: https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-...

https://dave.cheney.net/2014/03/19/channel-axioms

Re:The borrowchecker is what I like the least about Rust by Mawr on Sunday July 20, 2025 @09:56AM (#44625237)
Your "great read" is horrible.
Re:The borrowchecker is what I like the least about Rust by whytevuhuni on Sunday July 20, 2025 @04:03PM (#44628811)
From HN's guidelines:

> Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something.

I'm curious to know why you think so, I thought it was a great article, showcasing how simplicity in the language doesn't make complexity go away, it just moves it to programs written in it.

Re:The borrowchecker is what I like the least about Rust by vips7L on Monday July 21, 2025 @10:31AM (#44635557)
Golangers really don’t like any criticism of their language.
Re:The borrowchecker is what I like the least about Rust by jpc0 on Sunday July 20, 2025 @12:49PM (#44626926)
> A send to a closed channel panics

And the related read is purely a misunderstanding about how concurrency is modelled. Channels are not meant to be written from multiple writers, maybe this gets discussed in the next article. I can understand why it is confusing and you consider it unintuitive.

The read situation is literally not understanding or even looking up the interface, there is another return value that will tell you the channel is closed.

Nil channel reads make sense for it to do what it does if your familiar with the interface but at the same time you are literally holding it wrong. Vs a language where that would be UB its an improvement. Compared to a language like rust sure the information isn’t available at compile time but on the same not you would need to be developing in rust, and no offence but if you think golangs concurrency story is difficult to grasp just wait until you meet async rust…

These are the unintuitive, these are generally complaints of you failed to even begin to read the documentation and then complain when things aren’t doing what you expect, leave your preconceived notions at the door and you will be fine.

The faster than lime take needs to be updated, comparing golang from 5 years ago to modern golang is about as useful as comparing rust fron 5 years ago to rust now.

And you can happily make Cgo calls to the windows libraries if you want to access windows APIs, the language provides an abstraction for the normal use case not the specific use case, theres an escape hatch if you want it. And regarding the complaint about timeouts, context is a thing.

Because you don’t know how doesnt mean it’s unintuitive, it means you don’t know how.

Re:The borrowchecker is what I like the least about Rust by vips7L on Sunday July 20, 2025 @11:40PM (#44631586)
> And you can happily make Cgo calls to the windows libraries if you want to access windows APIs, the language provides an abstraction for the normal use case not the specific use case, theres an escape hatch if you want it. And regarding the complaint about timeouts, context is a thing.

Not having to call into ffi/c libraries to modify files is the normal use case. Windows is the largest used operating system.

> Because you don’t know how doesnt mean it’s unintuitive,

Do you know what the definition of unintuitive is? If it was intuitive you wouldn’t be able to “hold it wrong”.

Re:The borrowchecker is what I like the least about Rust by jpc0 on Monday July 21, 2025 @03:00AM (#44632474)
> Not having to call into ffi/c libraries to modify files is the normal use case.

A “systems” language designed by some smart people that is mostly targeted at the most deployed os in the world “cough not windows”, definitely does not need to make windows the default.

> If it was intuitive you wouldn’t be able to “hold it wrong

No unintuitive means if you understand the domain and idioms yet the interface still does not make sense. Returning multiple values when reading and passing context around (even in a wrapper) is normal intuitive golang.

So is allocating complex object instead of simply instantiating them, sure this point is slowly moving out of idiomatic golang but at the same time the history is important.

Not understanding CSP and not liking explicit return values does not mean it is unintuitive.

Re:The borrowchecker is what I like the least about Rust by vips7L on Monday July 21, 2025 @10:13AM (#44635349)
I never said Windows should be the default. I implore you to please actually reread what I said and the article. Having to call into ffi to work with files on a major operating system is not normal. It is valid to criticize these decisions whether or not it’s a “systems” language made by “smart people”.

I can see this conversation will go no where though. This is the typical conversation with Go users when you point out any criticism of the language. Cheers man.

Re:The borrowchecker is what I like the least about Rust by jpc0 on Monday July 21, 2025 @01:12PM (#44637667)
> Having to call into ffi to work with files on a major operating system is not normal.

You don’t. Normal operation like reading writing modifying and creating works just fine in windows.

The only thing that doesn’t is explicitly permissions where windows is the outlier and uses (imho a better) method of managing permissions. However they are the outlier and it is an uncommon operation. Why would the stdlib cater for that?

If you need to alter permissions at a more granular level on windows than is possible using golangs interface then call into the ffi, but in general you don’t need to to that.

If that is your only criticism then I agree we will not agree on this point, it is however also trivial to make ffi calls using go

Re:The borrowchecker is what I like the least about Rust by devjab on Sunday July 20, 2025 @03:12AM (#44622685)
I worked with C# for a decade and it's become a really great general purpose language. I'd still prefer never to work with it ever again after having worked with Go. This isn't for technical reasons at all, but because Golang is so easy to work with for "people reasons". There are brilliant parts of Go, but the only thing I find myself missing in other languages is the simplistic module isolation, where every folder is a module, every file within the folder is part of it and then you expose functions with capital letters at the beginning of their name. Holy hell did I wish Python had that. Anyway, the thing that makes Go nice to work with over time is the explicity of everything and a lot of the very opinionated decisions. With a piece of Go code I can jump in and immediately know what is going on regardless of who wrote it. With C# I'll often have to go down long "go to definition" paths. Often you will end up trying to figure out just how someone was trying to "fight" the implicit magic of the non-STL Microsoft dependencies they used. Usually because they didn't really understand what they were doing. All of these are human issues and no fault of C# or .Net as such.

Of the few technical advantages Go had for us is that we don't need a single dependency outside of the standard library, which can't live in isolation. We use SQLC and Goose, both are run in containers that only have rights and access on the development side of things.

I'm not sure I would say that Golang has a lot of weird, pointless quirks, but it has opinions and if you happen to dislike them, well... that sucks. I hate the fact that they didn't want runtime assertions as an example, so it's not like I don't understand why people dislike Go for various reasons. I've just accepted that those strong opinions is the reason Go is so productive.

The challenge for us is that it's not exactly as productive as Python. So while you'll need to do a lot of toolchain work to get Python anywhere near Go's opinionated stucture, that is often a better choice if you're not a hardcore software engineering team. At least for us, it's been much easier to get our business intelligence people to adopt UV, pyrefly, ruff and specific VSC configs for their work than to have them learn Go.

I suspect that is why Rust is also doing so well. Go is a better Java/C# for a lot of places, but are you really going to replace your Java/C# with Go if you have dacades worth? If you're not coming from Java/C# will you really pick Go over Rust? I'm not sure, but I do know, Go failed to become a Python replacement for us. It did replace our C#, but we didn't have a lot of C#. Eventually we'll likely replace our Go with C/Zig and Python to keep the language count lower.

Re:The borrowchecker is what I like the least about Rust by Mawr on Sunday July 20, 2025 @10:04AM (#44625297)
> I hate the fact that they didn't want runtime assertions as an example,

So you hate writing:

    if (something != 1) {
     panic("oh no!")
    }
vs

    assert(something != 1, "oh no!")
? Reminds me of people complaining about Python's significant indentation. If that's what you're complaining about, you have nothing to complain about.
Re:The borrowchecker is what I like the least about Rust by devjab on Sunday July 20, 2025 @02:15PM (#44627766)
I think your point is fair as you can do runtime safety in Go by wrapping Panic, but that's not exactly what Panic is meant to be used for. I guess it's more of a intent vs syntax thing, aside from the part where Panic can be Recover()ed.

You're taking it out of a context of me praising Golang, however, and while I do hate the fact that they didn't just do runtime assertions, it's not like I dislike Go as a whole because of it.

Re:The borrowchecker is what I like the least about Rust by Mawr on Sunday July 20, 2025 @09:55AM (#44625233)
> Rust itself or perhaps OCaml/ReasonML

So compared to... very niche languages? Go has exceptionally few quirks compared to mainstream languages.

Re:The borrowchecker is what I like the least about Rust by umanwizard on Sunday July 20, 2025 @10:25AM (#44625512)
Rust is a mainstream language
Re:The borrowchecker is what I like the least about Rust by dwattttt on Sunday July 20, 2025 @03:33AM (#44622778)
There's no free lunches. But I could take a problem, make it arbitrarily harder, then take that arbitrary limit away. If someone thought they had to solve the harder problem, and found out they only have to solve the easier one, did they get a free lunch?

This isn't meant to be allegorical or anything specific. I guess it's just an observation that sometimes your lunch can be cheaper than you thought.

Re:The borrowchecker is what I like the least about Rust by stouset on Sunday July 20, 2025 @01:04PM (#44627087)
From my point of view, the significant tradeoffs made in the design of go make it better suited toward software that has to change a lot: e.g., things closer to customer-facing that are constantly being iterated on.

Rust is more appropriate for areas where the problem boundaries are relatively fixed and slow-moving: libraries, backend services, and infrastructure.

By better allowing you to model your program domain, Rust actually lets you finish projects that are feature complete. I have multiple Rust projects in production for years that have needed at most one or two bugfix releases after their initial rollout on top of a half a dozen feature updates. For a very slight additional startup cost in doing that modeling, I’ve gotten massive dividends back in the volume of maintenance programming that hasn’t needed to be done.

But if your problem domain changes frequently enough that the model needs to be changed all the time, that extra inflexibility isn’t worth it. On the other hand, I don’t know much go software that isn’t beset by the same number of bugs as every other modern language.