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

If the file extension is ".litcoffee", it means that you're writing a Markdown document, where the embedded bits of indented code are the executable part of the program.

Basically, it just inverts the usual power relationship in a piece of source code, where the code is primary and aligned along the left edge, and the comments are set off in little fenced blocks. Now the comments are primary, and the code is indented in little blocks -- but it's still the same executable piece of source code.

The neat bit is when you have it all working properly in a text editor, your prose being highlighted as Markdown, and your code being highlighted as CoffeeScript.



After reading the docs and comments, this was the comment/explanation that made the light-bulb click.




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

Search: