
Explore the basics of Google's Carbon programming language, its relation to C++, and learn to use an in-browser compiler like carbon godbolt.org to master variables, data types, and output.
Master the basics of variables, data types, and printing in Carbon, including booleans, i32, and strings, with practical examples of var and let, and simple if-else.
Explore Carbon tuples, a heterogeneous composite type that stores different data types, declare and access their elements by index, and modify them, with name info and prints.
Discover how Carbon handles pointers, including the address of and dereference operators, nullable pointers via optional, and the absence of pointer arithmetic.
Master foundational carbon programming concepts, including variables, constants, data types, and operators. See tuples and pointers in a project and prepare for control statements.
Explore arrays and control statements in carbon, building on variables, constants, data types, tuples, and pointers, with arrays being homogeneous and used with repetition control statements.
Discover how arrays work in Carbon, a homogeneous data structure indexed from zero, with tuple-based initialization, element access, and in-place modification, plus a practical name array example.
Master selection control statements in carbon, including if, if else, and match, to evaluate boolean conditions with relational and logical operators for choosing among code blocks.
Explore repetition control statements in carbon, using while and for loops for counter and sentinel controlled repetition, and learn how break and continue shape loop flow.
Apply control statements and the modulus operator to print even numbers from two to twenty inclusive. Practice using a counter-based loop and selection logic in carbon.
Explore arrays and control statements in carbon, covering sequential, selection (if, else, match), and repetition with for and while loops, plus a hands-on project.
Explore Carbon fundamentals by examining arrays and control statements, then learn how functions and classes enable reusable code and object oriented programming to solve problems.
Explore how to decompose a program with functions, distinguishing void and value-returning, parameterized and parameterless forms, then apply this with square and cube functions invoked from main.
Explore object oriented principles and carbon classes, including data classes, encapsulated types, nominal and anonymous classes, and factory methods via class functions, with practical rectangle and person examples.
Master inheritance and polymorphism in carbon by modeling an is-a relationship, using base and abstract keywords, and extending animal with dog and cat for runtime dispatch via virtual methods.
Explore recursion through examples that count down from ten and count up to ten, and understand base and recursive cases, the call stack, and activation records.
Create a base class person with first name and last name, and derive manager and employee that override Dowork. Use polymorphic pointer to call Dowork on each and print names.
Carbon is a new, experimental programming language from Google that is designed to build on and be compatible with C++.
Designed as a successor language to C++, Carbon looks to advance C++ in the same way that Typescript updated JavaScript and Kotlin improved areas of Java.
PLEASE NOTE: This language is still very young and experimental, and is still not at the point for general software development. This course has been created to introduce students to Carbon in its current form. As the language continues to grow and develop, this course will be further expanded.
So why should students explore Carbon now?
Learn about language design
See how we are tackling specific challenges
Learn about compiler design
Learn about tooling beyond compilers
The language will be familiar to anyone with some knowledge of C++
This is the cutting edge! Carbon is still an experimental language that's growing, so users have the chance to contribute to and feedback about it to Google!
'Carbon ... is a promising alternative for C and C++ for systems programming, and for Rust for safety and performance'
This 3 hour course is a brilliant introduction to Carbon and, as the language develops, so will this course! A v1 version of the language is expected in 2024, and Codestars will be adding more updates and new content as and when the language expands further.
At the end of each section is a Section Project which draws together everything you've learnt in the section. The three section projects are a great way to practice what you've learnt, and test yourself with a challenge!
This course is for anyone new to Carbon, or programmers who are interested in tackling a new experimental language from the ground up.
Happy coding!