Are we still talking about COBOL?
Rust dev, I enjoy reading and playing games, I also usually like to spend time with friends.
You can reach me on mastodon @sukhmel@mastodon.online or telegram @sukhmel@tg
Are we still talking about COBOL?
To be fair, I disagree with all the points author makes, except for performance which is important but may be less important than code clarity in different cases. I am surprised that exceptions perform that well, and I am surprised the author said that compared C++ exceptions to Rust results, but actually did the right thing and compared C++ exceptions with C++ expected first. I thought it was going to be one of those “let’s compare assembly to lisp”
Yeah, I shaped my words poorly. What I meant is that errors are sort of equivalent to exceptions, but errors are first class citizens of type system, and this is an improvement over exceptions being kind of independent of type
Have you ever worked at large old corporation? Wasting money is a bit of an underestimation on that scale.
Also, not all banks use COBOL, but the ones that don’t are usually much younger.
Besides, Ada would’ve been a better example, as it is used by telecoms and seems to be held in high regard, unlike COBOL. The only issue with Ada I heard of is that it’s on par with C++ in complexity which is far from being simple.
I’m just going to ask, without making assumptions. Have you managed to cut some time to read the article and find an answer?
you never know what code your function or library calls that can produce an exception
As far as I remember, there were several attempts at introducing exceptions into type system, and all have failed to a various degree. C++ abandoned the idea completely, Java has a half-assed exception signature where you can always throw an unexpected exception if it’s runtime exception, mist likely there were other cases, too.
So yeah, exception as part of explicit function signature is a vast improvement, I completely agree
I feel like this will have zero protection against
if (result.isSuccess()) {
handle_error(result.error);
} else {
do_something(result.value);
}
Besides, this is exactly what the comment said about having to constantly check for return values at call site. I think this may be mitigated by some clever macro-magic, but that will become a mess fast.
I don’t know the answer to your question, but I think that what is needed is just a bit of syntactic sugar, e.g. Rust has ?
for returning compatible errors without looking into them. That seems to be powered by Try
trait, that may be a monad, but I am not fluent enough to check if it formally is.
It’s used because the ones who use it have enough money to pay for any problems that may arise from it’s use, and known problems are deemed better than unknown ones.
It is a viable model when you have enough money and resources, but a conservative one
it’s one of the most popular languages used for C/C++ build scripting
Unfortunately 😅
That way we’ll just find maintainers went near extinct over time, just like COBOL developers that are as rare as they are expensive. Only Linux kernel isn’t a bank, and maybe will not have as much money to pay to rare developers capable of maintaining C codebase
The hard part is “that add value”. Not only it’s hard to measure, but highly depends on scope of what is done
The team I’m part of wants to ditch Nix in favour of just about anything, because no one wants to maintain Nix and everyone sees it as just source of problems :(
I agree that it was complicated to learn Nix for me, too, but now I see benefits in it but I can’t make them change their mind and tired of trying. Nix could’ve been much easier to advocate for if the language itself wasn’t this esoteric
I may be too far from Python to tell, but it looks kind of incorrect to equate the author and their product. What if Guido decides to stop contributing, will Python end then? Creators of Rust spoken about the fact that Rust went very much not the way they wanted it to, this doesn’t make them not creators, nor does it make Rust not Rust
Cosmic balance, sort of 😅
I forgot that last time was in 2023, although the previous one was in 2016. SO had a lot of moderation drama and point-grinders that (imo) led to community becoming more toxic, to the point where it’s not too pleasant for me to participate in.
To be fair, they still have some good answers, and sometimes they can provide a useful answer, but edge-case rare obscure problems that seemed to be the very reason for SO are rarely answered now, as I see it
Sort of, but e.g. in case of MacOS you’ll have some apps that can’t be installed as Nix packages and some things that can’t be configured in OS
Also was not mentioned, since every dependency is unique you should have no trouble discerning versions that look the same, but in fact configured different or depending themselves on different versions of things, and introducing breakages that way. If you find that some specific configuration of dependency is causing you trouble, you can switch to a different one even if another package depends on this troublesome version.
only one man understood that thing
You will not, indeed, it’s going to be abstractions all the way down from now on
I guess, opening a PR without forking is possible, but hey that’s sort of incredibly bullshit idea