nullus157 / culpa Goto Github PK
View Code? Open in Web Editor NEWThis project forked from withoutboats/fehler
Rust doesn't have exceptions
License: Apache License 2.0
This project forked from withoutboats/fehler
Rust doesn't have exceptions
License: Apache License 2.0
Fehler was a good experiment in Ok-wrapping but I think that removing Result
and Option
is a bit too much. This view is also reflected by withoutboats' article in The registers of Rust, where it is said:
I've written before about why I think "Ok" wrapping functions would be a very good addition to Rust, and even implemented them as well. The only way my view has evolved since then (and here I think I am now more in line with the Rust project) is that using a syntax like try fn that doesn’t change the return type, so you can specify Option or Result, is probably the right approach for Rust. But overall having a syntax that keeps the user fully inside the effect (which is what Ok-wrapping really means), rather than halfway, would be not only more convenient but also more consistent with asynchrony and iteration.
I'm not proposing changing the #[throws]
macro but instead defining a new macro that does not change the return type. And maybe it should be called #[try]
, with the understanding that #[try] fn f() -> Result<i32>
could eventually become try fn f() -> Result<i32>
if Ok-wrapping ever became part of the Rust proper.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.