Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolutely unmotivating README #3

Open
safinaskar opened this issue Jun 17, 2022 · 1 comment
Open

Absolutely unmotivating README #3

safinaskar opened this issue Jun 17, 2022 · 1 comment

Comments

@safinaskar
Copy link

I completely don't understand why I should use moro as opposed to plain futures (not to be confused to tasks). README shows code example, but I can write similar example without moro using plain futures:

let value = 22;
let result = (async {
    let future1 = (async {
        let future2 = (async {
            value // access stack values that outlive scope
        });

        let v = future2.await * 2;
        v
    });

    let v = future1.await * 2;
    v
}).await;
eprintln!("{result}"); // prints 88

I tested this code and it prints 88. So please update README and write actually motivating example

@avtrujillo
Copy link

I found out about moro through this blog post, following a link from this one, which together do a good job of laying out the problem space and where moro fits into it. Maybe linking them would be helpful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants