need to talk with @CuppoJava if he is okay with this.
I think that this should be in collections as anybody that handles an hashtable should have its printer available and not risk to have forgotten to import another package and have to stop the program and add the import to display some variable content in your program.
show other people the proposed print outputs for types in collections, if somebody has a better proposition
I need to finish the test file (see TODO in it). But I get a Stack Overflow for no apparent reason:
print is human readable (no theoretical constraint, could be anything, it is supposed to look good) while write is machine readable (there is a hard constraint: getting a valid stanza expression that evaluates to the same object without having to import any other package than the package containing the definition of the type and the package where the writer is defined is different). So a printer is not a writer but a writer could be a printer. That is why write calling print by default is wrong. On the contrary, print could call write by default.
This PR enforces:
print
gives human readable output,write
gives machine readable output.It contains:
3 things missing:
print
outputs for types in collections, if somebody has a better propositioneven when commenting out all changes in core/core.stanza
2 remarks that would require breaking changes to change:
write
callingprint
by default is wrong. On the contrary,print
could callwrite
by default.