Open pefoley2 opened 8 years ago
I don't really agree; the name std::pair is vague at best, and fails to provide customizable functionality. Of course you could attempt to remedy this issue by writing something like:
typedef std::pair<std::string, std::string> whatever;
but the names "first" and "second" also aren't very descriptive either. For that reason I almost never use std::pair, unless I am seriously pressed for time (I usually never am). In any case, it's a matter of personal preference, and probably shouldn't be marked as an issue.
There's a reason we have libraries, it's almost never advisable to open-code something that has been part of the stdlib for decades. I see no compelling reason to have a custom struct.
string command should really be a stringbuffer. Don't re-invent the wheel, use std::pair, not struct attribs.