Category Archives: Language foundation

Now with husband: What is C3?

Seems wifi in rooms is not a standard thing in mexican hotels, I brought my computer with me but you’ll be reading this with a small delay. We had an amazing wedding, our family and many friends helped us into making this day a perfect one. But let’s skip those romantic girly memories of mine and head straight to main course: what is C3?

There are two principal aspects to the C3 project, the language and its programming environment. On the first approach, the language itself is similar to C++ in the fact that the syntax is C inspired and that C3 allows multiparadigm programming. C3 would be the natural evolution of C++, my husband feels that it is a very good language, the best achievement so far, but still, some improvements could be done, major ones. Many concepts in C++ were patched up a long time after its first design, which makes their implementation mostly suboptimal and sometime awkward. Some features are not even implemented in some major compilers because of the complexity of integrating them while maintaining others. Redesigning the whole thing will allow us to keep all those things that made us love C++ in the first place, and make major improvements in that same direction: flexibility, performance, control.

The C3 syntax is mostly a clean-up from the C++ syntax. One major improvement is on the declaration side. Making a simple declaration in C++ is a very easy thing, but when complexity comes, things quickly becomes to feel less natural. Pointer, reference and table symbols; do I put them before? After? In between? So many opportunities to be wrong. This is something C++ inherited from C. The original idea was that it would be great to have a declaration identical to its use. On the other hand, this is a nightmare to parse, and in the end, the declaration doesn’t look that much like the way it’s used. Even the creators of C now acknowledge that this has brought more problem than it has solve any. But stepping away for this long legacy still have a major drawback, it will not allow syntactic retrocompatibility with C and C++.

The flexibility of a multiparadigm language is essential to my husband. The C++ have been the best so far in that way. Other languages often try to be a representative of the purity of one paradigm or another, and mostly fail. One size fits all isn’t the most comfortable of sizes, different problems need different types of solution, and when facing complex situations, the best solution is often a combination of methods. All four C++ paradigm will be supported in C3

  • Procedural programming
  • Data abstraction
  • Object-oriented programming
  • Generic programming

But why stop when you can do more! There are two other paradigms that he wants to support: metaprogramming and functional programming. But the true goal would be to support paradigms that are still unknown to us. This is what good design is: to be used in a way it wasn’t intended to be in the first place.

I haven’t cover half of it but it’s enough for today, we are leaving to see Chichen Itza very early tomorrow. Maybe this will add a bit of mayan inspiration to C3, who knows?