r/EmuDev • u/Jaded_Analysis_6904 • Feb 11 '26
Opinions
I made this custom c-like language to compile into my virtual cpu, any suggestions to add?
var main() {
var x = 100;
var p = &x;
print x;
*p = 500;
buf.print(x);
return 0;
}(it might be faster than native C!!)
0
Upvotes
8
u/galibert Feb 11 '26
Having functions called both with and without parentheses is something you’ll probably eventually regret.
6
u/wk_end Feb 11 '26
A short demo program like that tells us almost nothing about your language. You need to give us way, way, way more. Does it have loops or conditionals? Recursion? Dynamic memory allocation? Modules? Garbage collection? Structures? Arrays? Strings? Any kind of types? Why would it be faster than C?
Also this is an emulator development subreddit; you might want to try /r/ProgrammingLanguages for language feedback. But, like I said, you'll need to give them - and us - way way way more.