1,005 karma · joined Mar 31, 2020 (6y ago) · 374 submissions
comment 4y ago · link · parent
comment 4y ago · link · parent
I'm guessing you already know this, but for anybody else reading - this isn't entirely accurate; Result::Err doesn't auto bubble up like an exception, you have to manually bubble it up. The "special sauce" comes from (A) the compiler forcing you to notice this and do something about it, and (B) the `?` syntactic sugar to make that super easy.
It does occur to me as I'm typing this that you might be talking about panics, though, in which case yeah that's entirely accurate.
comment 4y ago · link · parent
This isn't true for almost any language to the extent it's true for Go, and for many compiled languages it isn't really true at all.
> Try building a significant Python project on anything except a recent version of RHEL, Debian, MacOS, or Windows. For example, try getting your Python project running on something like a scratch Docker container. Or try packaging a Python package (which depends even transitively on a C library, especially one which isn't already packaged for Nix) with Nix.
While these are legitimate theoretical problems, none of them are really problems in practice. Containers don't need to be scratch, and if you're building a Python project, you're already not running a scratch container, so the addition of FFI doesn't change that. Nix is not an environment I've ever seen a requirement to support, let alone had a requirement.
It really seems to me that you like Go and you like Go's design decisions, but "I like this" is not the same as "this is better than that". I'm not particularly interested in rehashing the same conversation over and over again.
comment 4y ago · link · parent
As with many things, there's nothing stopping you from just sticking with pure Go if you don't like C toolchains. While C build issues are a valid theoretical concern, in practice I've never had any Python package fail to install because of a C dependency problem that wasn't trivially resolved, nor any Rust project fail to compile because of a C dependency problem at all.
comment 4y ago · link · parent
Lots of garbage-collected languages make FFI not only easy but plenty fast. Go does neither.
comment 4y ago · link · parent
Maybe I'm just too dumb for Go, but this is not consistent with my experience at all. Go's insistence on pretending that complexity doesn't exist would get in my way all the time. Go's extreme hostility toward FFI calls got in my way several times.
comment 4y ago · link · parent
Whether or not you can read everything on the screen at one time is missing the point entirely. The point is that context matters, and the more frequently you have to scroll to find it is more cognitive burden.
> 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 is far too easy to accidentally do the wrong thing with an error in Go. In Rust, for example, no matter what you want to do with the result of a fallible call, you have to do it explicitly. If you want to crash on error, you `.unwrap()`; if you want to bubble it up, you `?`; if you want to continue with a default value, you `.unwrap_or()` or one of its variants.
> in practice, Go seems to have fewer error handling bugs than exception-based languages
This is based on?
comment 4y ago · link · parent
I'd take exceptions any day of the week over Go's solution. I'd much rather the program crash by default than attempt to continue with corrupt data by default. I'd rather have concise, explicit, compiler-required error handling than exceptions, though.
comment 4y ago · link · parent
In Go, this looks like
thing, err := call()
if err != nil {
return nil, er
}
In Rust, this looks like let thing = call()?;comment 4y ago · link · parent
* Excluding Go's implementation of generics, which are frequently less performant than even vtable dispatch, let alone manually copied implementations.
comment 4y ago · link · parent
Energy sources that work when they want to will never replace energy sources that work when you tell them to. Lobbying against nuclear is just lobbying for coal and gas.
comment 4y ago · link · parent
This seems less like a material distinction and more like something that transphobic people would bring up to support their ideology.
> Furthermore, generic he has also been around for hundreds of years. So we should keep using that too, right?
My point was that it isn't new or somehow "a gen Z thing", not "all old things are good"
comment 4y ago · link · parent
"The problems caused by rules we oppose upon ourselves are so bad that we can't solve the real biochemical issues caused by airborne lead" may not be the compelling argument you think it is.
> Unfortunately if you put regular pump gasoline in an aircraft you are going to have serious problems. Not least because of the bioethanol mixed in which will degrade the pipes.
There are plenty of fueling options other than driving down to Shell and picking up some E10. There are also readily available fuel lines that aren't degraded by ethanol.
comment 4y ago · link · parent
As the person who owns and operates the service, I should have the control to set default configuration for my users. Just like I should be able to shut off all the ads for everybody, I should be able to set the default quality setting to max.
I can't do either.