Top 1,000 Features Creators Resources Blog Explorer Download
GitHub icon

Carbon

< >

Carbon is a programming language created in 2020.

#827on PLDB 4Years Old
Download source code:
git clone https://github.com/carbon-language/carbon-lang

Carbon language specification and documentation.


Example from the web:
package Sorting api; fn Partition[T:! Comparable & Movable](s: Slice(T)) -> i64 { var i: i64 = -1; for (e: T in s) { if (e <= s.Last()) { ++i; Swap(&s[i], &e); } } return i; } fn QuickSort[T:! Comparable & Movable](s: Slice(T)) { if (s.Size() <= 1) { return; } let p: i64 = Partition(s); QuickSort(s[:p - 1])); QuickSort(s[p + 1:])); }
Example from Compiler Explorer:
package sample api; fn Square(x: i32) -> i32 { return x * x; } fn Main() -> i32 { return Square(12); }

View source

- Build the next great programming language About Acknowledgements Extensions Day 630 Donate feedback@pldb.io