Measures Concepts
GitHub icon

Carbon

Carbon - Programming language

< >

Carbon is a programming language created in 2020.

Source code:
git clone https://github.com/carbon-language/carbon-lang
#606on PLDB 4Years Old

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 Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Day 605 feedback@pldb.io Logout