-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespacing for C++ #427
Comments
I don't think we ever recorded the results of this discussion properly (or if we did, it's in an issue we can't find), but the consensus between @sffc , @robertbastian , and I, if I recall correctly, was:
This means that C++ clients of ICU4X get no global namespace pollution, and C clients don't have to deal with C++-specific stuff. Clients using both can use both, if they wish to share types between both it is a little bit of work but that kind of type sharing is only marginally supported anyway. |
Some discussion:
Conclusion: If possible, try to inline C decls and result types into the header files so there are no more .h files. Otherwise, follow plan to stuff .h files under |
#512 finishes all the stuff I consider mandatory here. @sffc how important is it for namespaced headers to also be organized in folders named after the namespace? The main reason to do so is to allow name conflicts, but we could also handle that some other way (allow people to override the header file name with an attribute). It's a change we can only make pre-2.0, but the more I think about it the less necessary it seems to me. Most c++ libraries seem to organize their headers flat (mostly) |
Hmm, flat is probably fine; fewer decisions to make. |
In that case I think #512 fixes this! |
There's quality of life stuff we can do from here on, like the ability to pass in a default namespace from the CLI, but that's not mandatory for stability. |
Sub-issue of #103
Steps:
capi
code (Namespace c-in-c++ #512)The text was updated successfully, but these errors were encountered: