-
-
Notifications
You must be signed in to change notification settings - Fork 98
Rename vector to list #1016
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
Rename vector to list #1016
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 some minor things.
Also, please add a separate changelog entry for this PR.
@@ -45,7 +45,7 @@ struct fixture { | |||
} | |||
|
|||
type t; | |||
vector r; | |||
std::vector<data> r; |
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.
std::vector<data> r; | |
list r; |
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.
See my comment below for why going with std::vector<data>
.
@@ -55,7 +55,7 @@ FIXTURE_SCOPE(event_tests, fixture) | |||
|
|||
TEST(basics) { | |||
CHECK_EQUAL(e.type().name(), "foo"); | |||
REQUIRE(caf::holds_alternative<vector>(e.data())); | |||
REQUIRE(caf::holds_alternative<std::vector<data>>(e.data())); |
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.
REQUIRE(caf::holds_alternative<std::vector<data>>(e.data())); | |
REQUIRE(caf::holds_alternative<list>(e.data())); |
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.
Here, list
is the wrong way to think about this. An event is a sequence of data
, not an instance of list
. This is why I changed it to std::vector<data>
. It'll change with the record
change in data
as well.
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.
I think this is just unnecessarily confusing. A list
now is exactly a sequence of data
, because that is quite literally its definition.
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.
Yes, but it's a value for a single field. Here, we are modeling a sequence of values, each of which represent a single field.
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.
I still disagree with you, but not not enough to argue about this one.
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.
Fair enough, it'll change soon anyway once record
is there.
No description provided.