[ANN] Gutenberg: a pretty printer for Smalltalk
Philippe Marschall
philippe.marschall at gmail.com
Mon Jul 17 07:33:52 UTC 2006
2006/7/16, Damien Pollet <damien.pollet at gmail.com>:
> Hi,
>
> I've ported Gutenberg from VW. The package contains a pretty-printing
> algo (taken from Philip Wadler's papers on Haskell pretty-printer
> combinators) and a visitor to replace the RB one.
>
> It is available from:
> http://www.squeaksource.com/Gutenberg.html
Cool
> Once loaded you can activate it by evaluating this:
> RBProgramNode formatterClass: RBPrettyFormatter.
> You'll need to set the 'useRBASTForPrettyPrint' preference and use the
> browser in 'prettyPrint' mode.
>
> I need comments on the packaging, the pretty-printing itself (yes, it
> adds periods everywhere...) and ideas on making it customizable
> without basically rewriting a new visitor.
Maybe I'm just seeing things. But I'm missing stuff that should be there
- I think the preference should be named something like
useGutenbergForPrettyPrint (btw Markus renamed #useRBASTForPrettyPrint
to #useRBForPrettyPrint)
- an initialize on the class side, that installs the preference
- an unload on the same class, that removes the preference
- An override in Behavior >> #prettyPrinterClass, implemented so, that
you can switch between old pretty printer, rb pretty printer and
gutenberg.
> Oh, and I decline any responsibility if it breaks your code :}
Do you take responsibility if it makes my code work? ;)
Philippe
More information about the Squeak-dev
mailing list
|