[jira] [Commented] (MESOS-2564) Kill superfluous forward declaration comments.
[ https://issues.apache.org/jira/browse/MESOS-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15510409#comment-15510409 ] Alexander Rukletsov commented on MESOS-2564: https://reviews.apache.org/r/32608/ > Kill superfluous forward declaration comments. > -- > > Key: MESOS-2564 > URL: https://issues.apache.org/jira/browse/MESOS-2564 > Project: Mesos > Issue Type: Improvement >Reporter: Alexander Rukletsov >Priority: Minor > Labels: easyfix, newbie > > We often prepend forward declarations with a comment, which is pretty > useless, e.g.: > {code} > // Forward declarations. > class LogStorageProcess; > {code} > or > {code} > // Forward declarations. > namespace registry { > class Slaves; > } > class Authorizer; > class WhitelistWatcher; > {code} > This JIRA aims to clean up such comments. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-2564) Kill superfluous forward declaration comments.
[ https://issues.apache.org/jira/browse/MESOS-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14388362#comment-14388362 ] Alexander Rukletsov commented on MESOS-2564: I see. I think the intention of having a named section for forward declarations is not clear enough to folks (at least is wasn't clear to me). Some examples of what we have in reality: {code} // From slave.hpp class MasterDetector; // Forward declaration. namespace slave { using namespace process; // Some forward declarations. class StatusUpdateManager; struct Executor; struct Framework; {code} {code} // From master.hpp namespace process { class RateLimiter; // Forward declaration. } namespace mesos { namespace internal { // Forward declarations. namespace registry { class Slaves; } class Authorizer; class WhitelistWatcher; namespace master { class Repairer; class SlaveObserver; struct BoundedRateLimiter; struct Framework; struct Role; struct Slave; {code} {code} // From slave/containerizer/launcher.cpp ... some definitions ... 140: // Forward declaration. 141: FutureNothing _destroy(const FutureOptionint future); {code} Keeping forward declarations at the top of the file is not always possible, consider the case of nested namespaces. I would propose we kill this comment and introduce a note in our style that we put forward declarations at the top of the namespace. Does it make sense? Kill superfluous forward declaration comments. -- Key: MESOS-2564 URL: https://issues.apache.org/jira/browse/MESOS-2564 Project: Mesos Issue Type: Improvement Reporter: Alexander Rukletsov Priority: Minor Labels: easyfix, newbie We often prepend forward declarations with a comment, which is pretty useless, e.g.: {code} // Forward declarations. class LogStorageProcess; {code} or {code} // Forward declarations. namespace registry { class Slaves; } class Authorizer; class WhitelistWatcher; {code} This JIRA aims to clean up such comments. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-2564) Kill superfluous forward declaration comments.
[ https://issues.apache.org/jira/browse/MESOS-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14387545#comment-14387545 ] Benjamin Mahler commented on MESOS-2564: I'm a +1 but I believe [~benjaminhindman] enforced this style from the beginning. Kill superfluous forward declaration comments. -- Key: MESOS-2564 URL: https://issues.apache.org/jira/browse/MESOS-2564 Project: Mesos Issue Type: Improvement Reporter: Alexander Rukletsov Priority: Minor Labels: easyfix, newbie We often prepend forward declarations with a comment, which is pretty useless, e.g.: {code} // Forward declarations. class LogStorageProcess; {code} or {code} // Forward declarations. namespace registry { class Slaves; } class Authorizer; class WhitelistWatcher; {code} This JIRA aims to clean up such comments. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-2564) Kill superfluous forward declaration comments.
[ https://issues.apache.org/jira/browse/MESOS-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14387802#comment-14387802 ] Benjamin Hindman commented on MESOS-2564: - The intention was to force people to capture all of their forward declarations at the top of the file, and by explicitly calling them out with a comment it made it more clear that is where they belong (where as it's already common convention to always put your includes at the beginning of the file, although not necessary). I don't really see a ton of value of removing these, I don't see how/why they are negatively impacting the code base? Kill superfluous forward declaration comments. -- Key: MESOS-2564 URL: https://issues.apache.org/jira/browse/MESOS-2564 Project: Mesos Issue Type: Improvement Reporter: Alexander Rukletsov Priority: Minor Labels: easyfix, newbie We often prepend forward declarations with a comment, which is pretty useless, e.g.: {code} // Forward declarations. class LogStorageProcess; {code} or {code} // Forward declarations. namespace registry { class Slaves; } class Authorizer; class WhitelistWatcher; {code} This JIRA aims to clean up such comments. -- This message was sent by Atlassian JIRA (v6.3.4#6332)