HotSpot Style Guide should promote explicit dependency inclusion

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 16
    • Component/s: hotspot

      We should promote an "include what you use" style. Otherwise, refactorings that result in removal of #includes from header files can lead to cascading problems, because other headers were implicitly depending on those now removed #includes. Associated with this, we should probably also promote forward declarations. (Though forward declarations can combine poorly with our frequent use of C-style casts. What is intended to be a static_cast may actually be a reinterpret_cast because of incomplete types.)

      It would help if we had tooling to check this sort of thing, such as https://include-what-you-use.org. But even in the absence of that, we should still make some effort in that direction to make refactoring less painful.

            Assignee:
            Unassigned
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: