-
Notifications
You must be signed in to change notification settings - Fork 102
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
Make everything mutable for more convenient in-place updates? #141
Comments
I guess that'd help you aswell: https://github.com/jw3126/Setfield.jl |
I'm not really interested in Setfield for this because I'm thinking from the user's perspective. I don't want to tell people to use a macro to update a property. |
I think making the What about a constructor edit: also, with the mutable approach, that starts to make the struct layout part of the public API, which might make future development more constrained. It's also hard to put a lid on what bits are expected to be stable and what aren't. |
Yeah the |
Ah, I missed that issue. Well, I like that way :) |
yeah ok let's stick with the original plan. |
Suppose you have some template saved and you want to create a package from it, but the requirements for this package are just a little bit different than usual, for example you're writing some OS-dependent code and your template has
TravisCI(; osx=false, windows=false)
because you like to save energy. Currently there's no user-friendly way to update anything in a template, you'd have to create an entirely new one or worry about the Template's implementation details to find + replace the plugin.One simple solution: Make templates and plugins mutable. The main reason to not do this (AFAIK) is performance, but PkgTemplates isn't really a performance-sensitive package. This change, combined with an easier way to access a template's plugins (probably go back to storing plugins as
Dict(Type => Instance())
, would make little tweaks super easy. I think it would probably handle #38.I'm interested in hearing what others think of this.
The text was updated successfully, but these errors were encountered: