Hacker News new | ask | show | jobs
by rerdavies 702 days ago
It's kind of baked into C grammar. And there's absolutely no compelling use-case to fix it in C.

In C++, there's a very compelling case for making void an actual type, because you can't use void as a templated type, which means that templates involving functions that potentially have void return types require unpleasant amounts of template metaprogramming.

Now that C++ standards committees are considering basic usability fixes (e.g. the long overdue ability to do`namespace com::microsoft::directx { }`) there's a vague possibility that somebody might look into actually fixing this some time before 2040.

1 comments

That namespace thing has been in since C++20, right?
Pretty sure the namespace thing was in C++17
Right. Only took 37 years to fix a usability issue that Stroustrup fully expected to be fixed at the first available opportunity.

C++17 and C++20 both took up usability fixes. std::string::ends_with would be a a C++20 example.

Hopefully C++23 will be similarly open to usability fixes.

Ah yeah, I read the page too fast.