2 ms·
I'm trying to build a language that translates directly to C. I will just implement some features of the language in C, with some headers I can already find. I
by jokoon 4y ago
I'm trying to build a language that translates directly to C. I will just implement some features of the language in C, with some headers I can already find.
It feels like it's the best way I want to do this. That way, a C compiler can do a lot of work I really don't want to do, C already has backends, optimizers, etc etc.
All I want is a C-like language with native strings, hash map and list, tuples python indentation, vector math, and nothing else, and make it as simple as possible.
I'm a bit tired of new language trying to do new things, I just want something less verbose than C, but not as powerful as C++, with the feeling of python.
- GeorgeTirebiter 4y agoHave you looked at Nim? https://nim-lang.org/ https://nim-lang.org/ or Zig? https://ziglang.org/ https://ziglang.org/ or D? https://dlang.org/ https://dlang.org/
- jokoon 4y agoYes I know about all of them, they're all a bit too complex for my taste. They're great languages, but they're not what I want.
- GeorgeTirebiter 4y agoI understand. I wrote a language once, a while ago. To get the speed I wanted, I wrote it in assembly language - and it took over 2 years of fairly consistent effort to get something that really worked. (I would call it "Pythonic" but this was before Python existed.) So, go for it, and keep us updated on your progress. Good luck.
- Tozen 4y agoor Vlang (https://vlang.io/ https://vlang.io/), which can compile to C, and has a C2V transpiler.
- jokoon 4y agoYes, it's quite a nice language, but it still has features I wish it didn't. It's close to what I want to do, except it doesn't have python indentation, and it doesn't have tuples.