From 9863cb98bbda8997913c46dc94dbd518f0e8650e Mon Sep 17 00:00:00 2001 From: josh11b Date: Fri, 15 Jul 2022 13:47:37 -0700 Subject: [PATCH] Make C++ import syntax match what we've been using in examples (#1397) --- docs/design/code_and_name_organization/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/design/code_and_name_organization/README.md b/docs/design/code_and_name_organization/README.md index bc8220e15e26..7f706816d388 100644 --- a/docs/design/code_and_name_organization/README.md +++ b/docs/design/code_and_name_organization/README.md @@ -769,13 +769,14 @@ Currently, we do not support cross-language imports. In the future, we will likely want to support imports from other languages, particularly for C++ interoperability. -Although we're not designing this right now, it could fit into the proposed -syntax. For example: +To fit into the proposed `import` syntax, we are provisionally using a special +`Cpp` package to import headers from C++ code, as in: ```carbon -import Cpp file("myproject/myclass.h"); +import Cpp library ""; +import Cpp library "myproject/myclass.h"; -fn MyCarbonCall(x: Cpp.MyProject.MyClass); +fn MyCarbonCall(x: Cpp.std.map(Cpp.MyProject.MyClass)); ``` ### Imports from URLs