Show HN: The C³ Programming Language

github.com

1 points by 9o1d 14 hours ago

A new programming language based on the idea of simple modules. This makes it easier for humans to create programs.

Introductory article:

https://www.codeproject.com/Articles/5365472/C-Cubism-Extens...

GitHub repository has video tutorials.

Brief description:

Create a structure with data that is convenient to process together.

Create functions that take a pointer to the structure. Collect the functions in a single file, this is a module. Use keywords as a hashtag in the module.

Use a program "mod_to_h" that will turn the module into a series of header files that you can include in the program.

Use the module name with variables in the program. Some of the construction functions will be created by the compiler. In some cases, these functions are called automatically, so you don't have to do it every time, or you may forget to do it, such as freeing memory.

I have been creating this project for five years. Now I am working on simplifying functions. For example, this is an emulation of "for" cycles, so that the function can return in the middle of nested cycles, and then continue. In other languages, there are similar constructions, and I understand why they use them. I am studying programming technology. Often there are such functions that contain the rest of the program inside themselves, and this is wrong, since the function should perform only one task. The compiler must pack nested loops back to speed up program execution, and all functions are also tried to be made inline. It is also necessary to analyze the grammar of C, and other languages, since I plan to use the syntax of JavaScript and Python directly in the C program. A custom grammar will also be available. It is possible to use AI to create programs using simple modules written by a programmer.