Cilia Programming Language

Cilia Logo

This is a collection of ideas for a programming language that is based on C++, but with

Furthermore it is a collection of – in my opinion – quite obvious ideas. And mostly taken from other programming languages, of course.

Note
Currently it is more of a wish list, a “thought experiment”.
But a transpiler seems to be feasible (like Herb Sutter is doing it with Cpp2). In the long run one could imagine a Cilia parser/frontend, producing an AST for the common backend of an existing C++ compiler (like clang).

Cilia by Example

Corresponding code for C++, Cpp2, Carbon, etc. is given separately.

Also see example code for Matrix Multiply, Sieve of Eratosthenes, QuickSort, and FizzBuzz.

C++ with a New Syntax

Cilia is mainly a new syntax for C++, so it has the same core features:

Note
So in Cilia everything is as in C++, unless stated otherwise on these pages. Cilia by design mainly changes the syntax (“syntactic sugar”), not the internal mechanisms.

CamelCase Style

Roughly in the style of Qt and Java (or JavaScript, TypeScript, Kotlin, Swift).

Acronyms of at most two letters stay fully upper-case inside names, e.g. userID, IOStream. Longer abbreviations follow normal camel-case segments, e.g. ‘HttpRequest’, ‘XmlWriter’.

No Trailing Semicolons

For better readability.
When we are at it, after a quick look at Python, Kotlin, Swift, JavaScript, Julia.

Better Readable Keywords

C++ has a “tradition” of complicated names, keywords or reuse of keywords, simply as to avoid compatibility problems with old code, which may have used one of the new keywords as name (of a variable, function, class, or namespace). Cilia uses simpler, clearer keywords.