Skip to content
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

Refactoring stdcpp.list.d to remove duplications #19

Closed
wants to merge 2 commits into from

Conversation

Emmankoko
Copy link
Collaborator

most functions have common interfaces on all our target runtimes and so they have been removed to get only one interface representing under no conditional compilation block.

some of the functions have no difference in the interface structure on all our target runtimes
so these have been moved out of any version compilation as they increase duplications in the API.

they are removed from all three runtimes and just represented by a single interface since they are linkable and callable from C++
without any foreign additions
These ones have been moved to todo lists because as at now, D cannot call C++ templated member/nested functions
and so for future improvements. we fix reference issues as well
@WalterBright
Copy link
Member

The trouble with merging all the common code is when it the common code gets updated for operating system X, it doesn't get tested against other versions (and sometimes it is impractical to do those tests). This happens again and again with merged implementations for diverse systems. By not having merged code, then the expert on X can freely work on the version for X without being concerned about other systems. Experts on other systems can merge those changes into their version blocks as necessary. This methodology dramatically reduces the introduction of regressions.

Also, the person chasing down a bug in X's implementation benefits from not being distracted by a snarl of versions (which is typical of C .h files).

The D lexer is very fast, there is no speed purpose to merging similar code.

I'm sorry, but it's a no for this.

@Emmankoko
Copy link
Collaborator Author

I think I totally agree with you on the future implementation changes by the vendors and its effect.. but I thought this through because a change in implementation in any version of say.. void foo() function on any platform or target does not affect our void foo interface since the function in D fully depends on the C++ mangling equivalence. unless the function signature is changed which is going to cause ABI breakage in codes so hence the decision.

But I think I can be agreeing with you on the case of 'Anything can happen'.

@Emmankoko Emmankoko closed this Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants