talira

An experimental successor to C++

open sourceApache-2.0 WITH LLVM-exceptionfree

Carbon is an experimental successor language to C++, designed for performance matching C++ through LLVM and for seamless, bidirectional interoperability with existing C++ code, so one library in a C++ stack can move to Carbon without porting the rest. It has a modern generics system with fully type-checked definitions, opt-in templates for C++ interop, and a planned incremental path to a memory-safe subset, with migration tools to translate idiomatic C++ into Carbon. It's not ready for use: the compiler and toolchain are under development, with nightly builds and an online playground on Compiler Explorer while the project works towards its 0.1 release. Apache-2.0 with LLVM Exceptions.

Libraries for C++

View 40 more

Browse all of them: 58 libraries, 12 frameworks, 15 APIs.

Problems it solves

  • our huge C++ codebase is hard to evolve and I want a modern language that can call it directly
  • move one C++ library at a time to a safer language without rewriting the whole application
  • C++ templates give awful error messages and I want generics that are checked up front
  • a successor to C++ that keeps its performance and works with our existing build system
  • follow an experimental systems language designed for migrating away from C++

Features

  • bidirectional interoperability with C++
  • performance matching C++ through LLVM
  • checked generics with opt-in templates
  • planned automated migration from C++
  • nightly toolchain builds and a Compiler Explorer playground

Limitations

  • Experimental and not ready for use: there is no 0.1 release yet, only nightly toolchain builds.1
  • Nightly builds are available only for limited platforms, such as recent Ubuntu Linux.1
  • C++ interop is still being built: the toolchain doesn't yet support calling most C++ APIs.1

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Carbon does.

  1. Zig A general-purpose programming language and toolchain for maintaining robust, optimal and reusable software
  2. Rust A language empowering everyone to build reliable and efficient software.
  3. C# A modern, open-source programming language
  4. Swift A general-purpose programming language that's approachable for newcomers and powerful for experts
  5. Nim Efficient, expressive, elegant
  6. C++ A general-purpose programming language with a bias towards systems programming

Compare Carbon with the top 3