Giter VIP home page Giter VIP logo

Comments (2)

stetre avatar stetre commented on May 31, 2024

The ud is precisely the struct with the data I need and pass around.

The reason I usually have that sort of mapping, when I bind libraries, is that there are often situations where I have to retrieve the userdata from the pointer (not only the other way round).

I just gave a quick look at the code and I noticed that there are indeed places where I make an unnecessary search, which I could easily avoid by modyfing the check_Xxx() and test_Xxx() functions to
make them optionally return the ud together with the pointer. In other binding libraries I do this, in fact.

Not sure if this is a big deal, however, they are fast searches. Did you experience delays caused by them?

from moonfltk.

ComputerNerd avatar ComputerNerd commented on May 31, 2024

No delay at all. I agree that the code is fast. My only concern is code maintainability. You have to remember to keep that data structure up to date at all times otherwise you will experience bugs.

I will note that right now I have not noticed any bugs because of this. It was just something I was wondering about. I think for now we can close this and forget about this.

from moonfltk.

Related Issues (13)

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.