Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The fact that we still handle dependencies in 2017 by literally copy-pasting files into each other with #include macros is obscene.

Historically, C++ used includes so that it could be compatible with C. In the future, modules can be used which avoid many of the problems with includes [0].

[0] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n468...



Is this implemented yet? The paper you linked is a draft. I'm glad C++ is doing this.

> Historically, C++ used includes so that it could be compatible with C.

I think it is more the case that C++ slowly splintered off C and never broke free completely of #include. Rust is also quite compatible with C without supporting anything like #include. It even has a module system!


You are talking about limited binary compatibility instead of source compatibility. These are two different things and can't be compared to one another.


It is being implemented by the big three (GCC, Clang, and VC). In Clang and VC it is already usable to some extent.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: