Hacker News new | ask | show | jobs
by chc 1697 days ago
Surely the difference there is that Rust doesn't have header files.
1 comments

Not necessarily, you could imagine a system where the header file specifies its edition.
A header file can check #if __STDC_VERSION__ or __cplusplus versions to make some code conditionally available for, say, C11 or C++11.

  #if __STDC_VERSION__ >= 201112L
    // C11 feature
  #endif

  #if __cplusplus >= 201103L
    // C++11 feature
  #endif
But don't header files generally get concatenated together due to the way "dumb" textual includes work?