develooper Front page | perl.perl6.language | Postings from March 2005

lists in string context

Thread Next
March 12, 2005 11:32
lists in string context
Message ID:
An old exegesis says that ~<foo bar> is "foo bar". It was still _('foo',
'bar') back then, though. This behaviour I couldn't find in the
Synopses, but it wouldn't be the first time I completely overlook
important information while looking for it.

I think having it stringify as "foobar" is more useful, because in my
scripts I more often join on '' than on ' '. For short join(' ') syntax,
we already have "@array[]". Huffman's principle agrees, for the scope of
my repositories.

With this, I wonder what reverse(LIST) does in scalar context. Does it
join on '', like Perl 5 does? Or on ' ', consistent with current design
for ~LIST?

My gut prefers that both scalar reverse LIST and ~LIST join LIST on ''.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About