Git Product home page Git Product logo

Comments (5)

sorpaas avatar sorpaas commented on July 17, 2024

Totally agreed. We should have another Result type. ExecutionResult<R, N, E>, where R is the return type, N is NMI, and E is Error.

from sputnikvm.

sorpaas avatar sorpaas commented on July 17, 2024

But I'm going to postpone this until the next refactoring is done. That's a little bit more urgent.

from sputnikvm.

sorpaas avatar sorpaas commented on July 17, 2024

@sjmackenzie However, as I think deeper about this. The problem for using three type parameters is that trr! and Rust's try! and question mark syntax is dependent on the Result type. Most of the time, the control flow handling logic for NMI and Error are the same. So I think this is better handled by creating a NMI enum in ExecutionError. But as this doesn't affect any of the structure or logic of the sputnikvm design. This will probably be postponed a little bit till the next refactoring.

from sputnikvm.

sjmackenzie avatar sjmackenzie commented on July 17, 2024

Yes the control flow handling is exactly the same, but the semantics are different and now unambiguous - although NMI is a bit obtuse, maybe NeedMoreInfo is better!

from sputnikvm.

sorpaas avatar sorpaas commented on July 17, 2024

Closed via #105

from sputnikvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.