I'm not sure why forward reference declarations is needed nowadays(or if it really is from a language standpoint).
C could probably copy C++'s constexpr & static_assert stuff to get the first 2.
I'm not sure why forward reference declarations is needed nowadays(or if it really is from a language standpoint).
C could probably copy C++'s constexpr & static_assert stuff to get the first 2.
> I'm not sure why forward reference declarations is needed nowadays
The article gives reasons. Although they aren't necessary, they are deleterious to code layout which becomes a slave to the declaration order rather than aesthetic order.
> C++'s constexpr
is still lagging behind D's, after 17 years of development. In D, the garbage collector makes memory allocation in it trivial. Furthermore, only the path taken through a function needs to be CTFE-compatible, the path not taken does not.
https://devblogs.microsoft.com/cppblog/integrating-c-header-...
https://devblogs.microsoft.com/cppblog/integrating-c-header-...
https://devblogs.microsoft.com/cppblog/integrating-c-header-...
(In the past, there were more legitimate concerns on the ease of implementation. Nowadays, as the article points out, they are pretty moot, other than having to keep backwards-compatibility.)
I'm also rather bothered that on the bit on const execution in the article, there was no discussion on how to deal with functions that may not terminate or take rather long to execute. Especially considering the unit tests motivation, this seems like a rather blaring omission.
> how to deal with functions that may not terminate or take rather long to execute
Control-C, the same as when running any executable that shouldn't be taking that long. It doesn't solve the halting problem :-/
There is Vulkan based modules library.
fmt has modules support.
Me and several others already use modules in some extent.
That is a bit more than nobody.