Coder Social home page Coder Social logo

Auto-Generate Functions about imagej-ops HOT 4 CLOSED

imagej avatar imagej commented on July 21, 2024
Auto-Generate Functions

from imagej-ops.

Comments (4)

dscho avatar dscho commented on July 21, 2024

It is doable, alright. But our paradigm has been -- at least so far -- to try to Javassist things only as an optimization, and requiring everything to work even without Javassist (albeit slowly).

from imagej-ops.

ctrueden avatar ctrueden commented on July 21, 2024

I think Function interface is actually about more than just performance. It conveys expectations about repetition and multithreading, too: the "special" input is the one which will vary when repeatedly calling the function in a loop, and/or from multiple threads. So, I do not think the single-input Function paradigm is "arbitrary" in that sense.

I am wary of clever code generation. Even the Velocity-based generation we are doing now adds a level of indirection making the codebase harder to understand. And throwing javassist into the mix seems very dangerous to me, from a maintenance/debugging perspective.

If we need a Function-like thing that has two special inputs, we can create a separate interface for that, and so on, for each case... unless you have a use case requiring some arbitrarily large constant C number of variable inputs to a compute-like method? But if so, there is probably another way to approach the problem.

from imagej-ops.

ctrueden avatar ctrueden commented on July 21, 2024

@dietzc: Do you still want to pursue this idea? Or did I talk you out of it at the hackathon? I'm happy to discuss further on this thread if you wish; otherwise, let's close this issue.

from imagej-ops.

dietzc avatar dietzc commented on July 21, 2024

you actually talked me out of it. closed! 👍

from imagej-ops.

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.