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

>"Compiled to C"

Must be fun to debug generated C code.



It's very easy with the "#line" macro. Works perfectly with gdb too, at least in Nim-land debugging embedded firmware via JTAG.


C compiles to assembly, Chez Scheme compiles to C, Idris2 compiles to Chez Scheme. They are fine languages to work with.


To each their own. If I can't step through original code when debugging I am not interested. I've had my share of debugging machine codes. Do not want anything resembling it.


#line directive gives you exactly that, you step through original code, it's similar to source maps in JavaScript. #line directive has two arguments the file name and the line of the source in your language i.e. nim, nelua, koka whatever. Debuggers support it for decades. Having said that, printing variables and making debugger aware of the type system of the original language is another story maybe someone can comment on that.




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

Search: