28 karma · joined Aug 28, 2020 (6y ago) · 18 submissions
comment 5y ago · link · parent
If aysnc could work like regular blocking code , if we want, and async code when you want, I think rust would be in a better place.
Just because you can do something doesn't mean you should.
comment 5y ago · link · parent
Maybe we should start trying to think about async as being something can use if they want and ignore if they want. Code being async compatible rather than async required.
comment 5y ago · link · parent
Why do I need all this other bloat just to run a function? Why can't I just run the function?
comment 5y ago · link · parent
The problem I see is the current async story is opt-out. It's use async or go find something else. Async should be opt in. As in, the code works regardless of an async runtime, async is added magic if you want it, but it will run like normal single threaded code if not.
comment 5y ago · link · parent
As for long term success, good luck, but once bitten twice shy.
comment 5y ago · link · parent
Art by definition has done the opposite. Unique pieces that are HARD to copy (IIRC art only gains value once the artist is dead) and thus can gain value.
This feels to me like a weird version of DRM which has no real world use case.
comment 5y ago · link · parent
As a rust developer, there are other ways to skin a cat, or an Error return as it were. For the std::net library (I've been using it when dealing with tcp/udp sockets), when a socket returns an Error, it uses std::io::Error [1]. This is basically a struct that implements the display and Error traits, it stores an enum inside of the types of errors that you may want / need to ignore/ handle. You don't technically need to use libs to do anything error related.
This code has been round since Rust 1.0. Imho, this is kinda how Rust should tell people to make/handle errors. I like it. But I also have found rust enums to be extremely powerful in a lot of use cases.