News for hackers. Stuff that matters.
Re:Rust 1.56.0 and Rust 2021 by chc on Thursday October 21, 2021 @12:05PM (#28946533)
Surely the difference there is that Rust doesn't have header files.
Re:Rust 1.56.0 and Rust 2021 by masklinn on Thursday October 21, 2021 @12:10PM (#28946620)
Not necessarily, you could imagine a system where the header file specifies its edition.
Re:Rust 1.56.0 and Rust 2021 by cpeterso on Thursday October 21, 2021 @03:21PM (#28949636)
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
Re:Rust 1.56.0 and Rust 2021 by dralley on Thursday October 21, 2021 @04:00PM (#28950105)
But don't header files generally get concatenated together due to the way "dumb" textual includes work?