Content deleted Content added
moved clear template for better layout and less wasted whitespace, still avoids the example and the infobox getting in each other's way |
m rv IP 1 April 2024 |
||
(13 intermediate revisions by 8 users not shown) | |||
Line 10:
| designer = [[Google]]
| typing = [[Static type|Static]], [[Nominal type system|nominative]], [[Type inference|partly inferred]]
| influenced by = [[C++]], [[Rust (programming language)|Rust]], [[
| programming language = [[C++]]
| license = [[Apache-2.0-with-LLVM-Exception]]
Line 17:
}}
'''Carbon''' is an experimental [[programming language]] designed for
The language intends to fix several perceived shortcomings of C++<ref name="difficulties improving cpp" /> but otherwise provides a similar feature set.
Line 62:
</syntaxhighlight>
| <syntaxhighlight lang="c++" line="1">
#include <vector>
struct Circle {
};
void PrintTotalArea(
{ for (const Circle& c : circles) {
area +=
}
}
int main() {
// Implicitly converts `vector` to `span`.
PrintTotalArea(circles);
return 0;
Line 98 ⟶ 96:
* [[Go (programming language)|Go]]
* [[Rust (programming language)|Rust]]
* [[Mojo (programming language)|Mojo]]
== References ==
Line 179 ⟶ 175:
== External links ==
* {{GitHub|carbon-language}}
* [https://docs.carbon-lang.dev/ Carbon language documentation]
* [https://carbon.godbolt.org/ Carbon at the Compiler Explorer (godbolt)]
Line 191 ⟶ 188:
[[Category:Programming languages created in 2022]]
[[Category:Google software]]
|