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

Add default prim implementations to further reduce boilerplate #4

Open
LaCuneta opened this issue Feb 7, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@LaCuneta
Copy link
Collaborator

LaCuneta commented Feb 7, 2022

In looking at the Python extension code, I think there is an opportunity to slash a little more boilerplate. The Run, RunResult, and Set prims could be made more generic, taking in an appropriate lambda to execute the actual action. Or it could be an object implementing an interface. I should double-check the R and JS extensions again to make sure my intuition is correct, but I'm opening this so I don't forget.

@LaCuneta LaCuneta added the enhancement New feature or request label Feb 7, 2022
@JamesHovet
Copy link
Contributor

Maybe its because I just read an article for one of my CS classes about how sometimes a little duplicated code is better than a non-universal abstraction but I think that the benefits of de-duplicating that code is less than the cost of it not necessarily fitting all use cases.

And of course you could still expose the underlying library calls but I think that I like having the one way of doing things and having the line between the client code and the library code where it is.

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

No branches or pull requests

2 participants