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

In fact, that often even bleeds forward into the front end. For a compiler, you're in this state of actively discarding information. Comments? Don't even lex them. Variable names? Just de Bruijn index them.

FYI, for anyone thinking about writing a production compiler front-end, don't do this, it's a terrible idea.



I think the important bit is to not throw that information away until after you've reported any compile errors. Once you know the code is valid, you can discard that stuff (unless you need it to generate debugging information).


Oh, yes, that's fine. Although by that point you've kind of already spent the time, so it's not going to gain you much by throwing it out.


Because your error messages might be less-than-useful. Not that Wasabi ever had an issue with that. Cough.




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

Search: