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

Cool idea, I like languages that compile down into C/C++ (like Nim), leverages the ubiquitious nature of C compilers across multiple platforms. Are there any samples of the final sources? It says it's designed for library development, but if there's a error/bug in the generated code am I actually going to debug and parse it effectively? Generated code may be "readable" but it is it understandable? Or am I going to have to try and fix it in the original code (which may be difficult to pinpoint the source of the error if context is lost during compilation)


> Are there any samples of the final sources?

https://github.com/pfusik/cito/issues/21

I generally check-in just the Ć source and not the translations, but if you want a quick look at the generated C code, here's some: https://sourceforge.net/p/asap/code/ci/master/tree/asap.c

> if there's a error/bug in the generated code am I actually going to debug and parse it effectively? Generated code may be "readable" but it is it understandable?

I had no problems with that so far. Nim adds a lot of boilerplate code in C output. cito sometimes adds a few lines here and there, but mostly it looks like the code you would write directly.


Thanks to LLVM compiling your language via C seems to have plummeted in popularity somewhat.

It used to be a somewhat popular option for Haskell as well.


And Eiffel, which uses a JIT based VM for development and then compilation to native code via the platform C or C++ compilers.


> Are there any samples of the final sources?

Have a look here:

https://github.com/pfusik/datamatrix-ci


Those aren't samples of the final sources. It's a C-acute program, that output a library in the various languages, and example sources that make use of that output. Although there's usually no reason committing an output, this case is probably an exception.




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

Search: