Larry Wall wrote:
Well, regardless of whether there are extra spaces, please note that
the default stringifications are not intended as a serialization
format.  They are intended only to provide a bit of human readability
for the common case of small, spaceless items such as numbers and
words; they make no guarantee about the sanity of the delimiters.

Fair enough. But then ... see below
So now I want to read in the data again. (The problem arises because perl6 has a memory leak and my program segfaults after five loops, so I need to store the intermediate data; this is a serialisation problem, but I dont need to go to the extreme of yaml for it).

Hmm, if you think yaml is extreme, yowie, the world is a harsh place...
If all I want is a tab delimited list, any serialisation standard is overkill
I guess I can only suggest that you use .perl instead, for a minimal
serialization format.  Or write your own explicit formatting and
serialization using .fmt calls.

That I had not considered. Using perl5, I am used to outputing simple data with print, and reading in with <> Extra spaces dont get inserted at random. I got to thinking that .say is .print with \n. It seems to be slightly more.

But having stringification that aims for legibility is extremely useful.

What it comes down to is education of users. Am I right in saying:
.say is for outputing legibly
.fmt.say is for when you want precise control over the output

Maybe there should be a health warning on documentation about .say, or at least a reference to .fmt whenever .say is mentioned.

Reply via email to