-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Create some type aliases for string Contexts #6235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nit, but do what you want with it ;)
@@ -64,6 +64,8 @@ class JSONPlaceholder; | |||
|
|||
typedef int64_t NixInt; | |||
typedef double NixFloat; | |||
typedef std::pair<Path, std::string> NixStringContextElem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove this and use NixStringContext::value_type
instead? Doesn’t change much, but I find it more explicit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe it should be this way to be consistent with SearchPathElem
. which I had completely forgotten about in the time since I first wrote this code.
Not sure this is really an improvement. If I see |
@edolstra The problem with Concretely this also made #6237 easy (baring the GCC bug) because I could just change the definition in one spot. |
Also c.f. |
@edolstra Naming types by what they mean is always better for readability. There are so many arguments for creating (the right!) abstractions, and the idea is so commonplace, that any serious source I can think about citing would already sound corny and stereotyped. |
#6237 This contains and motivates this, so I will close this in lieu of that. |
No description provided.