Repository navigation
Implement #115 - #126
Implement #115#126
Conversation
|
I'm not a big fan of "major style reformat" just for the sake of it, especially if there's something functional mixed in. For the functional part: exposing the enum is fine. (However I would not be in favor of reimplementing For the style part: I'm not opposed to these kinds of changes, but it does a lot of churn. If it helps developers feel happier about the codebase then that would be a value. (FWIW, Yes, I hate tabs; I actually prefer using trailing-underscore these days for member variables; but what was done for reasons I cannot remember 5 years later :) ). |
|
Can you split out the functional change from the style changes (as separate PR)? |
|
@jaredgrubb By style changes, do you mean |
|
I see... I'd prefer to rename them to "kind_" and "variant_" in that case. If we're going to change the style, that's my preference :) |
|
@jaredgrubb Done |
|
Is there a reason this hasn't been merged? Would you like me to make some changes? |
|
Beginning to feel like I'm talking to a brick wall here... 😅 |
|
There is no good reason it hasn't been merged :) |
|
Thanks for your patch! |
Implements issue #115. I moved the
Kindenum out into thedocoptnamespaces because I thought thatdocopt::value::Kind::StringListwas an unnecessarily long name. I found out that this library uses tabs instead of spaces. The raging war between tabs and spaces continues!I've been thinking about ways to refactor
docopt::valuefor a while now and a few of them break backwards compatibility. Something that doesn't change the interface but cleans up the internals a little bit is the use of a visitor (much likestd::visit). It could look something like the following.That simplifies a lot of the other functions. Like
operator==for example.Some other changes would be to rename
docopt::valuetodocopt::Value, mark as many functions as possible withnoexcept, use.hpp(C++ header file) instead of.h(C header file), also thatconvertToLongthing I've been rattling on about (which can be implemented in C++11 but better with C++17). Would some of these changes be accepted in a PR? What about the breaking changes? Should I stick to C++11 (it's almost 10 years old at this point)?