GithubHelp home page GithubHelp logo

Comments (2)

safakgur avatar safakgur commented on June 1, 2024

Hi Alex,

Yes, member expressions are used to get the argument names and compilation is necessary to get the values. Both initializing an expression and compiling it are expensive actually but you are right that the compilation being the bigger issue.

For initializing guarded arguments (Guard.Argument overloads): I don't understand how I can use constant expressions for this as I don't know a way to get the value from a member expression without compiling it. Can you give me an example or point me to a resource or code where this is used? I'd love to implement this if it is possible.

For member guards: Compilation costs are fine here because I actually cache the compiled delegates, so the cost is one time only. The creation of the expression itself remains an issue since unfortunately, those lambdas are not cached.

Thank you for using the library, I'm glad you liked it.

from guard.

safakgur avatar safakgur commented on June 1, 2024

Closing this issue as it has been inactive for 43 days. Feel free to re-open if needed.

from guard.

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.