Arc Forumnew | comments | leaders | submitlogin
3 points by vrk 6494 days ago | link | parent

I would see more value in making a documention generating macro, so that you could easily keep the documentation and program code in one place, not unlike Perl POD and JavaDoc.

  (doc "<function documentation>"
    (def fun args ...))
In normal compilation, the doc macro would simply return the function definition, but it could be defined to generate, say, LaTeX or HTML, or a DOM tree that could be rendered using an arbitrary markup language. The difficulty is identifying the type of code that is enclosed in the doc block, as if you want to extend the paradigm to non-function definitions, or arbitrary macros even, it's going to get hairy.


3 points by treef 6494 days ago | link

already done in the arc-wiki (def fun args "comment" body)

that was like the first thing we added

-----

1 point by vrk 6493 days ago | link

Well! This is certainly a nice improvement.

-----