You raise an interesting philosophical question. See below.
On 05/08/2019 23:21, William Michels wrote: <snip>
mbook:~ homedir$ perl6 -e 'for lines ("a\nb\n") { .say }' a b mbook:~ homedir$ Okay. How to express this in simple English?
'How to express in ... ' is about translation. Perl 6 is a precise language for expressing exact processes. English is a general language capable of expressing emotions and descriptions, but not so good as precision, hence the need for languages like Perl 6. So what you want -- that is a translation of a Perl 6 idiom in 'simple English' is not really possible because simple English doesn't do precision.
However, if you need some sort of commentary to help form a paradigm of Perl 6 in your mind, then use whatever form of words works for you. If your simple English description works for you, that's great. But it does not work for me - I prefer to understand Perl 6 in its own terms.
Writing a one-liner "for" loop for use on a shell command line, you can feed lines into a block using 'lines()' and adding the target file at the end. Or you can write "for lines ("line_1\nline_2\n") and then the functions you want to perform inside the block. Correct?
If it works for you, and helps you and other people who share your approach, then thats great. But I don't think it is "correct" because 'correct' is a poor word to use when judging translations.
There is also a danger when relying on translations into English of precise Perl 6 expressions, in that the translations can lead you to false conclusions. For example, you said earlier something like 'Perl 6 does not allow lines without brackets in a for'. But that is not true.
Best Regards, Bill.
<snip>