Building a C inspired language give your idea's
▲ 9 r/teenagersbutcode+1 crossposts

Building a C inspired language give your idea's

ok
i COMPLETELY redid it

implementing some borrow checking features
redid newline as end of line to semicolon

getting better function/struct syntax
adding more mem safe features
& more

GOALS:

make a language thats low level yet still simple enough to read and learn for begginers
make it usable

im not writing the compiler 100% by myself as im adopting the QBE IR into it
it will be compiled

include: <stdlib.h>      #something like that not final though

do_my_addition:void (&num1, &num2) {
 write "answer:\t {&num1 + &num2}";
}

main: () {
 let ovr I = 4: i32;  #means let overidable 32 bit int I be value 4
 write "{I}";        #write variable I
 
let player = struct{           #structs  mutable by default
   player hp: i32;                  #unused 32 bit int called hp
   player defence: i32;             #unused 32 bit int called  defence             
};

struct player:p1[hp = 100, defence = 10]; 

write "ill do your addition enter your numbers please";
let fbd num1:i32;
let fbd num2:i32;
scan(&num1, &num2);

do_my_addition(&num1, &num2);


}; 

more info at

https://limewire.com/d/bGSkB#qIcCv8Ud1I

u/TrueWar515 — 6 days ago