Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could write a 100-line python script that compiles from your custom language to C code and it's still be better than C. There's lots of ways to re-use existing tooling and the bar really isn't that high for better languages


Why do you think more of these projects don't take this approach? I would be 10x more likely to try one in a professional setting if I knew the portion I was taking chance on was source translation layer, and I could rely on the well tested and supported C infrastructure.


The Nim language compiles Nim source code into C as an intermediate step.


I was considering this for my programming language but I will most likely not use it because it makes optimisations and garbage collection harder, and the C would not be human readable (just look at the output of the chicken compiler for an example) so there's not a huge benefit. C-- could be an option but it isn't very active or well used.

In terms of relying on tested and supported infrastructure lots of these projects use llvm.


It's frankly harder and/or less fun to generate C and integrate with whatever locally support C infrastructure you have than it is to BYO.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: