Conversation
|
@phlexbot format |
|
No automatic markdownlint fixes were necessary. |
|
No automatic cmake-format fixes were necessary. |
|
Automatic clang-format fixes pushed (commit 5236ed9). |
|
I am unclear about the reason for the shared state in the implementation of identifier. Are identifiers modifiable, such that it is important that modification of one identifier should be seen by copies of that identifier? I think this is not the case. Is this sharing intended only to be an optimization (perhaps so that copying identifers is cheap)? If so, I think this is a premature optimization. It may be that the state of the identifier will end up being cheap to copy. It may not be cheaper to copy the std::shared_ptr (which also involves adjusting reference counts) than the necessary state. I am also unclear about the use of hashes. It appears this is intended to be an optimization to make comparison for equality inexpensive. I think this is a premature optimization, because we do not yet know exactly what the state should be in place, and what comparisons are necessary. |
The identifiers are (semi) immutable (i.e. you can't mutate the identifier, but you can replace it wholesale with the assignment operator). The
Here, I disagree that this is a premature optimization. The way identifiers are used, they're looked up in We're already doing something like this manually in |
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (75.32%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. @@ Coverage Diff @@
## main #288 +/- ##
==========================================
+ Coverage 74.28% 75.32% +1.04%
==========================================
Files 124 126 +2
Lines 2955 2954 -1
Branches 513 519 +6
==========================================
+ Hits 2195 2225 +30
+ Misses 540 505 -35
- Partials 220 224 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
Review the full CodeQL report for details. |
|
@phlexbot format |
|
No automatic markdownlint fixes were necessary. |
|
No automatic cmake-format fixes were necessary. |
|
No automatic jsonnetfmt fixes were necessary. |
|
Automatic clang-format fixes pushed (commit 110f528). |
* Introduce phlex::identifier * Change return value of value_if_exists to identifier * Add tag_invoke for identifier * Add test for value_if_exists --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This splits out the
identifierimplementation from #267, and removes the inheritance from (and implicit conversions to / from) `string_view.There is still an explicit constructor from
string_viewand an explicit conversion operator tostring_view.Removing the implicit conversion necessitated implementing
tag_invokesinceidentifierno longer satisfiesis_string_like<identifier> = std::is_convertible<identifier, std::string_view>.