Hacker News new | ask | show | jobs
by ithkuil 1040 days ago
File != Compilation unit

In circle the features are literally per-file. Which means you can have a source file that enables a feature and which include headers which doesn't use that feature, which in turn includes another one that includes that header etc.

At first look it seems that the problem is self inflicted and that if we got rid of headers and use modules c++ would be like rust.

But even in rust, editions can only be applied at the level of a crate. Crates are effectively the compilation units of rust

What circle does is more granular and it would be the equivalent of a rust edition per module or pet file.