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

flesh out How ImportC Works section #3070

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

WalterBright
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

into D code. Being able to handle forward references means it is not necessary to even
write a .h file to be able to import C declarations into D. Being able to perform CTFE is
very handy for testing that ImportC is working without needing to generated an executable.
But, in general, the strong temptation to add D features to ImportC has been resisted.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What "strong temptation to add D features"? I thought it was very clear from the start that the goal was to import existing C code, not write new C with D features mixed in.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is clear. But I am tempted, and people will ask "why not" add some.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of D features are you tempted to add to ImportC? I think this paragraph leaves some open questions to the reader, another example:

Being able to perform CTFE is very handy for testing that ImportC is working without needing to generate an executable.

Why is this handy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of D features are you tempted to add to ImportC?

Like make . work as a substitute for ->

Why is this handy?

The test suite runs much faster if it doesn't have to generate an executable.

@mingodad

This comment has been minimized.

@FeepingCreature
Copy link
Contributor

FeepingCreature commented Jul 23, 2021

This is very offtopic here. Consider putting it on the forum instead? https://forum.dlang.org

@PetarKirov
Copy link
Member

@mingodad What you posted is a valuable contribution, but as @FeepingCreature mentioned your post was quite off-topic, as I had to hide it. (Please don't take it personal or even as against your proposal!) Can you please post your proposal as an enhanced request on https://issues.dlang.org (our Bugzilla instance, which we use for issue tracking)? Additionallly, as @FeepingCreature mentioned, you can also post it on https://forum.dlang.org, to invite more feedback from the community.

@dlang-bot dlang-bot merged commit e8f3754 into dlang:master Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants