logoalt Hacker News

aw1621107today at 10:36 AM1 replyview on HN

I think the most recent revision of the proposal basically says it not helping for such use cases is intentional? e.g., from Section 4.4.1. Standard Library Redeclaration [0]:

> Thankfully, we are not particularly concerned about the ability to upgrade this [user-redeclared stdlib] function: users who are declaring Standard Library functions without including the header like this are doing this strictly as experts. They have a strong expectation of what symbol they are getting from their distribution. Transparent aliases are meant to be used for functions which rely on type definitions or structures which may change, prompting the need to provide updated global variables and updated functions without breaking old binaries.

> <snip>

> Therefore, we do not do anything to support or inhibit such declarations. Implementations looking to keep such declarations working from older versions of code should consider leaving those old symbols within their binary artifacts (system tables, shared/static libraries, etc.) to continue supporting such a use case; this proposal is not going to address it or the myriad of other issues around this (such as strong/weak symbols and other attributes/aliasing issues).

To be fair, that section is talking about the stdlib specifically, but nothing jumps out to me as precluding it applying to libraries in general.

[0]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3913.htm#d...


Replies

ueckertoday at 1:25 PM

Indeed, it now admits this. But what problem is this then really solving?

show 1 reply