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

Decision for #175: C++ interoperability goals #200

Merged
merged 5 commits into from
Dec 9, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions proposals/p0175_decision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Decision for: C++ interoperability goals

<!--
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

Proposal accepted on 2020-11-24

Affirming:

- [austern](https://github.com/austern)
- [chandlerc](https://github.com/chandlerc)
- [geoffromer](https://github.com/geoffromer)
- [gribozavr](https://github.com/gribozavr)
- [josh11b](https://github.com/josh11b)
- [zygoloid](https://github.com/zygoloid)

Abstaining:

- [noncombatant](https://github.com/noncombatant)
- [tituswinters](https://github.com/tituswinters)

## Open questions

All open questions in the document are intended to be answered later after we
have more experience.

## Rationale

The core team agrees with the mapping of the proposed interoperability goals to
the overall Carbon goals as rationale.

Embedding of Carbon in C++ code is inspired by experience with CUDA, where users
provided feedback that CUDA was preferred over alternatives such as OpenCL due
to the ability to embed it in the same source file as C++. It also matches the
approach of bridging between C++ and C where bridge code is often embedded as
`extern "C"` within C++ source files.

The non-goals seem appropriately motivated by the non-interoperability
priorities, without undermining the effectiveness of the interoperability as a
whole.

We agree with ensuring some level of C interoperability in order to effectively
interoperate with both some parts of the C++ ecosystem that rely on the C ABI as
well as all other languages which target C-based interoperability.