-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Use haumea.lib.load
as functor for flake itself
#6
Comments
That's interesting! I'll have to think about that |
After some discussion, I decided to hold off on this because of the added complexity and that I will keep this issue open for now for visibility. I'm still open to suggestions, I might change my mind if more people want to see this. |
I like it's shortness and make use of this myself. Every well-scoped library has a prime interface. Haumea's is But I'm qlso not too attavhed to the general flake schema. 😄 That's probably why, to me, it feels like a reduction in verbosity rather than a deviation from the standard. |
I am posting in a pretty stale issue here, but I'm actually for using
I don't think that's the correct level of analysis. Indeed, there is a very simple metric of "you save keystrokes" you improve, but I don't think that's a very compelling improvement in haumea's case: like you said, it's a short attr path to the func, and the func's name itself is short. Additionally, it's also probably not going to be called that often in a single project, so you're not saving that many keystrokes in aggregate either. Rather, I think the compelling case for I think the infamous " |
This may be a bit of a controversial feature suggestion, but if we use the nix feature to declare
__functor
in attrs, we can make attribute sets callable. This way we can make the haumea flake itself callable. Since we have a go-to function that most people would want to be using withhaumea.lib.load
, we could make that the default function of the flake. If we write in the main flake:Then, in a using flake we could write:
The text was updated successfully, but these errors were encountered: