Create some type aliases for string Contexts#6235
Create some type aliases for string Contexts#6235Ericson2314 wants to merge 1 commit intoNixOS:masterfrom
Conversation
thufschmitt
left a comment
There was a problem hiding this comment.
Just a small nit, but do what you want with it ;)
|
|
||
| typedef int64_t NixInt; | ||
| typedef double NixFloat; | ||
| typedef std::pair<Path, std::string> NixStringContextElem; |
There was a problem hiding this comment.
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.
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.