The end result of Contachit
is C++ code (by clicking on translate button). However, there are differences.
-
The syntax is different (better in my opinion).
-
Memory management! Contachit has automatic memory management (without using "smart pointers", "garbage collection", or any kind of reference counts). The
syntax simply knows which pointer variables should be freed and does so.
You will learn more about this later on, but one amazing feature of this, is that Contachit KNOWS exactly how to auto-generate C++ "copy/move
constructors" and "copy/move assignment overloads". This is a huge time saver!
-
Contachit source code only needs a single file (ending with .ibp), unlike C++ which splits declaration and definition into two files (.h and .cpp).
-
Valid Contachit code is ALWAYS formatted correctly. When you save a file, it's re-parsed. As long as the file has no parse errors, it
automatically adjusts the code to be formatted correctly. The consistant use of the same white-space rules, helps ensure reading someone
else's code is not a hassle.
There's some compatibility via the concept of a "fake function" and "fake object", which serve as
aliases for existing C++ functions/classes.
This lets the Contachit parser be aware of C++ function/classes that exist outside of your Contachit code, while at the same time enforcing
Contachit syntax.