Previewing Quxlang!

It’s not quite ready for you to try out yet, unless you like staring at LLVM IR and objdump -Cdt ./*.o, but at the very least, it’s about time to start introducing the newest contender to the world of systems level programming, Quxlang!

Quxlang is a mixed-level programming language, intended as a successor to C++ that aims for a wildly different approach from other so-called C++ successors like Rust and Carbon.

My goal with Quxlang is to learn from the mistakes of C++ and build something that improves upon those fundamentals in a manner that can’t be done while retaining backwards compatibility with C++. This will, perhaps, mean some hardship. But for those who are just as irritated as I am by const &&, but don’t want a radical paradigm of lifetime checking (like Rust) nor abandoning the VOP(value oriented programming) principles that make Carbon less than desirable (imo), I have decided to create my vision for what C++ should look like.

Quxlang should mostly feel like C++, but with a few changes:

  1. I’m aiming for much faster compilation times. While I can’t really prove that it will compile faster yet (it’s not nearly ready) I think the fundamental design and algorithms I am using should in principle be much faster. There’s no pre-processor stage and no header files to compile over and over in different translation units!
  2. Oh, did I mention no header files? Yup. No forward declarations required. You can use a class before you declare it. The compiler will solve things using a recursive descent solver. Well, that might not be an adequate description of what it’s doing. Perhaps dynamic solver? Regardless, it handles it with no problems.
  3. Templates are kinda different, and by that I mean there are no more partial specializations (sad?). But don’t worry, if you want, you can specify a template argument that takes a pointer like -> T(t1)! Templates will also support ENABLE_IF(...) and INCLUDE_IF(...) syntax.
  4. Ambiguous overloads? That’s annoying in C++, in Quxlang you’ll be able to just write PRIORITY(5) or whatever and it’ll just chose the highest priority overload automatically.
  5. Hate build and dependency scripting hell? qxc will take the entire source aggregate, including dependencies, and compile it in one step. No command line parameters will be accepted, that’ll all go in the build definitions. More details on that in a future blog post.
  6. In a future version, the Quxlang compiler will not use the C layout for structs unless the C_LAYOUT keyword is used. Instead, in the Quxlang layout, the compiler will reorder the binary layout of the structure to make the structure more compact without causing any misaligned members. This will reduce the memory footprint of types.

But this is more than a dream, it’s real, or at least, half-real. I can’t really call Quxlang a real programming language quite yet, but it’s progressing quite nicely, to the point I am confident we’ll see the beta 1.0 version within a few months! 1

Recently I was working on the assembly support. It’s not quite ready, but the proof of concept shows it can at least emit object files with the right coaxing. Here’s an example with some of the code coming from Quxlang and 1 of them using assembly:


Code here: https://gitlab.com/rpnx/quxlang

Stay tuned for more progress! Comments and suggestions welcome.

  1. Aha, a “few” might turn out to be a fantasy. It turns out that compilers are complicated and I don’t have nearly enough free time to work on this. Oh well. Maybe 12 months from the blog post? It didn’t help that I decided to write IRv2 instead of going with the original. We’ll see how this goes… ↩︎

Leave a comment