📜 ⬆️ ⬇️

Cj - new programming language

This idea has long been settled in my head. But I postponed everything until later - there were more important or interesting matters. And now I regret, I had to drop everything and focus only on her!

Everyone was waiting for that idea? The idea is to write your own programming language!

A sigh of disappointment, 99% threw their computers out the window, but for those who stayed, I will continue.
')
I have always been interested in various directions and the web I want to sbatsat both mobile and desktop and I am ready to write something server-side, I am also interested in AI, games, robots, cryptocurrencies ... And at the same time, I would like to write all this in one language).

I looked in the direction of C ++, C #, Java, Javascript and even Python, but everywhere I didn’t like something ...

So, everything is decided, I write my programming language. Cross a powerful C ++ with easy Javascript and call it Cj!

image

We start to invent the syntax of the language


When describing variables, I propose to give an opportunity, as in C ++, to immediately indicate the type of a variable. To describe an automatic variable, we use, as in C ++, the word auto, or do not specify, as in Javascript, the data type at all.

int a;
auto b;
c = 5;

:

int sum() {}
auto sub() {}
mul() {}

! (), , function, Javascript, !

, : sitev.ru/post/163


, LLVM. , . , . , : 4- , ++! , .… , , LLVM!

Cj


, , . ? . , . .

— , statement ().



main_block_code {}. .



— . :



:



, :




: -, . ( JavaScript).

Cj:

int my_func1(int p) {
int a;
a = 5;
}
my_func1();


Javascript:

function my_func1(p) {
	var a;
	a = 5;
}
my_func1();

, . , if! . , : !

, .

, , Cj!

Source: https://habr.com/ru/post/340204/


All Articles