Pure static classes to namespaces#17812
Conversation
Signed-off-by: Josiah Kiehl <josiah@capoferro.net>
Signed-off-by: Josiah Kiehl <josiah@capoferro.net>
|
/retest |
|
Retrying Azure Pipelines: |
|
"Envoy prefers namespaces to static classes." --> citation needed :) I can't find any reference to that in https://github.com/envoyproxy/envoy/blob/main/STYLE.md -- and I thought it was plenty common to use statics in a class in Envoy. |
Oh... I got a comment on the last PR that I should use a namespace instead. I don't personally have a preference. |
|
Heh -- I personally prefer static class methods for various reasons, but don't feel that strongly. I'll defer to @dmitri-d :) |
|
Haha, I don't actually feel strongly about this either, I thought that was the preferred way for grouping of static functions in Envoy. Lgtm. |
|
@jmarantz Are you the one to hit the merge button? |
|
I'm OK merging this but IMO this is not at all preferred by Envoy style, for the record. I think Envoy is OK with either one and there are a ton of existing uses of classes with static members, and there are some benefits to that approach. |
Commit Message: Reviewer prefers namespaces to static classes (Envoy style guide doesn't mention this).
Additional Description: This is a followup from comments in #17728
Risk Level: Very Low
Testing: Existing