Maybe something to be learned here https://youtu.be/iSmkqocn0oQ
I want off Mr. Golang’s Wild Ride (2020)
71–80 of 477 posts
Re: I want off Mr. Golang’s Wild Ride (2020)
#72I see this point everywhere about Rust's union types and it always kind of irks me: > The point is, this [Result type] makes it impossible for us to access an invalid/uninitialized/null Metadata. With a Go function, if you ignore the returned error, you still get the result - most probably a null pointer. It's all about framing. You can just as equally say it is "impossible" to access an invalid Go FileInfo, because…
The difference is what the language makes easy to do and how it signals to you you're about to do something dangerous. If you call `.unwrap()`, that's a big yellow flag that you're going to be taking the gloves off and maybe touching something radioactive. Go has the maybe-radioactive thing sitting right there; safely touching it and unsafely touching it look exactly the same. I generally enjoy using Go, but this is…
Re: I want off Mr. Golang’s Wild Ride (2020)
#73Earlier quoted context omitted.
I mean, all programming language communities are partial to their language, but among Go there seems to be an unusual tolerance for disagreement and discussion of language issues compared to most other programming languages. But yeah, when you come in guns blazing talking about how certain language features are "shit" and there's no possibility of elegance, people are rightly going to think you're not there for any s…
> Note that there definitely are PL communities that generally can't handle any criticism irrespective of civility, but the Go community isn't among them. Indeed, in my experience, Go's critics are very often much more zealous than its proponents. This is because Go is a programming language for people who don't care about programming languages. I mean this in the most positive way possible. If you're using Go, it's…
> Go is not a fun language to program in
Not having to think about how something should be done in the most elegant way, instead focus on the problem at hand is a lot of "fun"
Re: I want off Mr. Golang’s Wild Ride (2020)
#74To say go's simplicity is a lie, then to go and and say this; > This function signatures tells us a lot already. It returns a Result, which means, not only do we know this can fail, we have to handle it. Either by panicking on error, with .unwrap() or .expect(), or by matching it against Result::Ok / Result::Err, or by bubbling it up with the ? operator. What the hell? I'm not a rust dev. I have no idea what half of…
"Bubbling up" is the default in C++, when the code you call throws an exception and you don't have a try/catch for it.
Re: I want off Mr. Golang’s Wild Ride (2020)
#75Earlier quoted context omitted.
Do C++ people actually call it "bubbling up"? I don't think I've used a language where this isn't the default behaviour so I'm not sure I've ever heard it given an actual name, it's just what happens when you don't catch the exception - it keeps going until someone does catch it, or it hits the runtime and demolishes your program.
I've heard "propagating" the exception used as well.
Re: I want off Mr. Golang’s Wild Ride (2020)
#76Earlier quoted context omitted.
The latter is a much stronger argument than the former (no idea why people get so worked up about character counts), but even then, "shit" is really strong considering how often one experiences exception traces when using an application written in Python or Java or some other exception-based language. Point being, we should probably evaluate error handling schemes based on results rather than ideology (even though I…
Screen real estate is limited, especially vertical real estate. Compared to languages with saner error handling, I can read approximately 25% as much Go code at once. That's a real cognitive burden when maintaining code or learning your way around a new codebase, which seems especially egregious from a language whose community consistently proselytizes about how the lack of language features is great for maintainabil…
In my experience, people can't actually read everything on the screen at one time anyway, and the more dense/terse things are the harder it is to read (otherwise we would minify everything).
> I'd much rather the program crash by default than attempt to continue with corrupt data by default.
It's not likely that it will continue with corrupt data because you can't use the return value without explicitly ignoring the error. It's not perfect, because there are cases where you want to crash when there is an error but no return value, and Go doesn't help you here. I would like to see this improve, but it's relatively low on my list of qualms with Go (I would rather have sum types, for example). It certainly isn't worth changing languages over especially since, in practice, Go seems to have fewer error handling bugs than exception-based languages.
Re: I want off Mr. Golang’s Wild Ride (2020)
#77Earlier quoted context omitted.
> Note that there definitely are PL communities that generally can't handle any criticism irrespective of civility, but the Go community isn't among them. Indeed, in my experience, Go's critics are very often much more zealous than its proponents. This is because Go is a programming language for people who don't care about programming languages. I mean this in the most positive way possible. If you're using Go, it's…
Well put and I agree with most points but > Go is not a fun language to program in Not having to think about how something should be done in the most elegant way, instead focus on the problem at hand is a lot of "fun"
Re: I want off Mr. Golang’s Wild Ride (2020)
#78Earlier quoted context omitted.
Off-topic, but HN needs review of flagging abuse. Maybe assign flagging privileges only to those with X reputation, and revocation if on review the privilege is abused? It seems that flagging is as much "I don't like this" as "this is not appropriate". Likewise downvoting. Maybe instead display both downvotes and upvotes, so people can see if a comment is found controversial?
This is how the system already works...
It doesn't mention revocation of flagging permission for abuse, and I think that would be helpful.
Re: I want off Mr. Golang’s Wild Ride (2020)
#79Go is really really good at some things. Its alright at others. Its awful at others.
Re: I want off Mr. Golang’s Wild Ride (2020)
#80Golang is great because it was the first to include excellent tooling in addition to the language (strict compiler, linting, non-customizable gofmt, package manager, good html docs, online playground, etc.) It’s undeniable that it brought a lot of good ideas that languages like Rust borrowed. Golang is still undefeated in terms of battery included. Its standard library is top notch and full featured. On the other han…