Things like this always tend to give off a Streisand effect - I had never heard of House of Zana before this, and this article prompted me to look into it.
To 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 this means. "bubbling up"? What the fuck even is that?
What's your argument? The point the article is making is that Go says it's simple, but isn't, while Rust doesn't say that it's simple, and uses its complexity to solve the complex problem.
Bubbling up means returning the error to the caller, and is general error handling jargon.
And the reason Go keeps a toe-hold in the ecosystem is that file-handling is simple for most people, most of the time.
Rust is expressing the full complexity of a twisty maze of corner-cases built up from decades of filesystem features being slapped on with no care for each others' existence. Go just says "Sure, but you won't need most of that most of the time; here's a subset that usually works." So it solves most people's problem most of the time with far less words (with the trade-off that if you get burned, you get burned).
Just because Go doesn't have a consistent API for file stuff, does not make it 'not simple' it makes it inconsistent. It is still simpler, and easier for me to understand ALL of the Go code on screen, than it was for me to understand just that rust function signature, and all the stuff in the paragraph I posted.
I hear you. People keep saying Spanish is an easier language than English, but yesterday I pulled up an article written in Spanish and I couldn't even read the first word.
"Bubbling up" is common parlance for "exit this function early and return the error we got from our callee" (or "wrap the error we got from our callee and return that")
In Go, this looks like
thing, err := call()
if err != nil {
return nil, er
}
When you throw an error and don't catch it, you just let the error immediately propagate up to the calling function. Think "return err"
>> Either by panicking on error, with .unwrap() or .expect()
This means fatally terminating the program immediately when an error is encountered in this spot.
>> or by matching it against Result::Ok / Result::Err
Result is an enum can be one of either Ok<T> or Err<E>. Pattern matching is one way of finding out which, and running code depending on which variant it is. It's just a fancy and convenient if statement, if that helps.
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 this term more often in JS contexts than in C++ contexts, to be honest. I don't think C++ programmers use the term all that often, though the reference to error propagation will probably be understood anyway.
If Twitter is a consciousness, then it's one that's all "id":
the instinctual component of personality that is present at birth, and is the source of bodily needs and wants, emotional impulses and desires, especially aggression and the libido (sex drive).
It doesn't have even a shadow of "superego" to put in charge of moderating its wants and desires. It's an infant -- an infant that is never going to grow up.
If it's a "global consciousness", then it's a consciousness of an entity I do not wish to ever meet. It's a terrible person, and it's only getting worse.
[0]: https://en.wikipedia.org/wiki/Directed_acyclic_graph