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

People throw the word 'literate' around a lot, and while I do like what we've got here, as originally envisaged, literate programming allowed you to lay out your code for narrative flow regardless of how the compiler needs your code to be sequenced.

I like what litescript is doing here (and in my opinion markdown is near perfect as a literate programming documentation language), I'm just worried that people will forget that the vision of literate programming is quite a bit larger than is typically implemented.



I knew that dimension of 'literate'.

LiteScript allows you to "lay out your code for narrative flow regardless of how the compiler needs your code to be sequenced" ..by not requiring a specific sequence.

You can start with "main" code, and define "secondary" code and "helper" functions and classes later in the file.

(the price to pay to allow that is the need to do several passes over the AST to link object declaration to object usage)


I was referring to essentially this view: http://www.perl.com/pub/tchrist/litprog.html

In particular, my understanding of the original concept requires that you be able to create and reference macros for arbitrary pieces of code.

I hadn't seen any mechanism in litescript to allow you to split up your code beyond what is normally possible with functions (e.g. to defer the explanation of parameter defaulting or early return code to later), although perhaps you're referring to the preprocessor functionality which is an interesting feature, or maybe you think that you can extract functions for every meaningful lump of code these days?




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

Search: