[Pharo-project] How can I do literate programming?
Hello all, having a very short memory I need to write quite a lot of comments. I loved the way to do this in Haskell, where you essentially write a LaTeX document which happens to contains some code snippets and which still is an executable program. In squeak I used to write "pretty" class comments, using sections with titles in bold fonts and hypertext links where another class or method was referenced in the text. In Pharo and in the latest squeaks this no longer seems to work. Bold fond silently disappears when saving the comment, hypertext seems to be gone entirely in Pharo. Comments in methods are moved aound by the configurable formatter, i.e. I found no way to place comments BETWEEN statements. Now I certaninly don't want to complain. But I would be happy if someone could give me some advice on how to comment code in a stylish way. -- Martin
We need to improve on that level but this requires to fix the formatter and we do not cycle for that. Now we would love that. Guys have been working on a mark down parser so that class comments and help can be optional displayed nicely. Now the first thing is to write class and methods comments.
Hello all,
having a very short memory I need to write quite a lot of comments. I loved the way to do this in Haskell, where you essentially write a LaTeX document which happens to contains some code snippets and which still is an executable program.
So in Smalltalk you can write full expressions in comments and class example methods.
In squeak I used to write "pretty" class comments, using sections with titles in bold fonts and hypertext links where another class or method was referenced in the text.
In Pharo and in the latest squeaks this no longer seems to work. Bold fond silently disappears when saving the comment, hypertext seems to be gone entirely in Pharo.
Comments in methods are moved aound by the configurable formatter, i.e. I found no way to place comments BETWEEN statements.
Now I certaninly don't want to complain. But I would be happy if someone could give me some advice on how to comment code in a stylish way.
-- Martin
participants (2)
-
Martin Drautzburg -
Stéphane Ducasse