-
Hi, first I just have to say that I am very amazed by the work that has been done on this project, I'm very grateful to have found this repo, thanks a lot to the developers. To preface my question, I have recently been looking for a language that transpiles to C, because while I do know it a fair bit, I just have my own reasons for why I think the syntax could be better, and I still need to be able to use the C ecosystem. I also need the transpiled code to be readable, changeable, and similar to what a person would write, since I want to be able to tweak it and share it with others. So far, many of the languages that transpile to C that I have reviewed (Nim, V, Vala, Nelua) produce C code that is very long, chaotic, and cryptic compared to what a person would be expected to write. Fusion is the only one I have found that produces something that I want. Now, on to my question: Is using (not relying on) Fusion for assistance in program development a bad idea? It is stated in the documentation that it was never meant for developing full programs, but for developing libraries. I am interested in using it to more efficiently produce code I could still produce myself. While I don't see a reason why this couldn't work, absence of evidence doesn't imply evidence of absence, so that's why I'm asking. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, fut doesn't parse C header files and thus cannot call C functions, except for from native {
#include <stdio.h>
}
public static class Hello
{
public static void Main(string[] args)
{
foreach (string arg in args) {
string s = arg;
native { puts(s); }
}
}
} While it's probably possible to code this way, it will quickly become very tedious, with no obvious advantages. (why not code in C directly?) Two years ago @CLanguagePurist forked fut (then called cito) to create a C-only transpiler, with goals looking similar to yours. |
Beta Was this translation helpful? Give feedback.
Hi,
fut doesn't parse C header files and thus cannot call C functions, except for from
native
blocks. See a small sample:While it's probably possible to code this way, it will quickly become very tedious, with no obvious advantages. (why not code in C directly?)
Two years ago @CLanguagePurist forked fut (then called cito) to create a C-only transpiler, with goals looking similar to yours.
See #76. His project seems to be gone now.