Prettyprinter limitations
Factor handbook > Developer tools > The prettyprinter

Prev:Extending the prettyprinter


When using the prettyprinter as a serialization mechanism, keep the following points in mind:
When printing words, USING: declarations are only output if the pprint-use or unparse-use words are used.
Long output will be truncated if certain Prettyprint control variables are set.
Shared structure is not reflected in the printed output; if the output is parsed back in, fresh objects are created for all literal denotations.
Circular structure is not printed in a readable way. For example, try this:
{ f } dup dup set-first .
Floating point numbers might not equal themselves after being printed and read, since a decimal representation of a float is inexact.

On a final note, the short. and pprint-short words restrict the length and nesting of printed sequences, their output will very likely not be valid syntax. They are only intended for interactive use.