News for hackers. Stuff that matters.
Re:Rust needs a web framework for lazy developers by kortilla on Sunday October 06, 2024 @07:58PM (#41761450)
>Result<T, E> where E implements Error` and lack of nulls or exceptions

This all goes out the window when people throw “unwrap” all over the place because “this should always succeed”.

Re:Rust needs a web framework for lazy developers by creatonez on Sunday October 06, 2024 @08:11PM (#41761520)
Rust does not skirt around the fundamentals. You can still handle errors however you want, you can still blast side effects all over the place, and you still have to uphold an arbitrary set of invariants specific to the task at hand. But the ecosystem as a whole is filled with things being done the right way because the language and its linters have always been quite helpful.
Re:Rust needs a web framework for lazy developers by LAC-Tech on Sunday October 06, 2024 @10:04PM (#41762111)
In any program there are errors you can handle and errors you can't, errors whose vary existence suggests something has gone horribly wrong. What else should you do in that situation but panic?
Re:Rust needs a web framework for lazy developers by kortilla on Wednesday October 09, 2024 @06:16PM (#41793328)
I see unwrap used all of the time on things that could be recoverable if people bothered to write the control flow. “Meh, let the program crash” is easier because unwrap is much less verbose than the match unpacking or carrying results to callers.

Rust has exceptions, they are just named Result and people just as frequently decide not to handle error results as not catch exceptions in my experience.

Typed exceptions are just as good as what rust offers IMO.