I just saw some people in #general talking about a hypothetical 'C+' language. Well, let me showcase what I have been working on for the past year or so, coincidentally called CPlus/C+ 🙂 It's mainly C with some QoL extensions:

  • Function overloading;
  • Out-of-order-ness, no forward declarations needed for anything;
  • C++'s auto;
  • Jai's using - still experimental;
  • Defining functions within functions;
  • No separate scopes for structs, unions, globals and types; just one scope for everything; no int promotion; some more lax typecasts;
  • A #define_block+#define_end multiline version of #define meaning no backslashes for multiline #define's;
  • Modules, which are a kind of non-nestable namespaces with some added features - kinda experimental;
  • Most of C11.

The module system and the out-of-order-ness are the most important ones, because they allow easy unity builds, without any header files/forward declarations, and It Just Works.

It's nearing completion featurewise, I am currently working on a X64 backend to go along with LLVM. It is decently stable but it's still completely unoptimized. To test the compiler/language I am building tools and libraries (e.g. GUI lib, profiler, debugger, editor) for it which will eventually form an IDE. It currently compiles ~30K lines of C+.

Images showing some example code and a profiler written from scratch in C+: