Hi guilers, is there an "official" policy on whether or not examples in the manual should be self contained?
On IRC, kudkudyak was confused about read-line not being found when he tried to run one of the socket examples. Naturally, I pointed out that this is because read-line is in (ice-9 rdelim). Some manual examples, however, do include imports https://www.gnu.org/software/guile/manual/html_node/Hash-Table-Reference.html includes srfis 1 and 13. An example in https://www.gnu.org/software/guile/manual/html_node/Dynamic-FFI.html includes (rnrs bytevectors). With the obvious exception of examples whose entire purpose is to show off the module system, and similar, I think we should adopt a consistent policy one way or the other, and adapt all the examples to it. My vote would be for self-contained: it can be copied directly into a file or REPL and executed, and IMO reduces confusion. I already try to do this when posting any examples on paste.lisp.org or in a gist. Other people may feel differently, as it is relatively easy to search the manual for missing procedures and, as cky put it, "I don't believe in copypasta coding". -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"