ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-language
perl6-language
Re: Hyper-concat
by Darren Duncan other posts by this author
Jun 14 2005 3:12PM messages near this date
Re: Hyper-concat | Re: Hyper-concat
At 12:01 AM +0200 6/15/05, Juerd wrote:
> Larry Wall skribis 2005-06-14 14:54 (-0700):
> >  :     [ 'a' .. 'e' ].join   # "a b c d e"
> >  :     [ 'a' .. 'e' ].cat    # "abcde"
> >  I had forgotten that.  Yes, there is a little something to be
> >  said for preserving the (mostly false) symmetry of split and join.
> >  I think I argued for .cat on the basis that it also gives us cat as
> >  a list operator.  But these days that's just [~], so at the moment
> >  I'm inclined to stick with argumentless .join doing concatenation,
> >  especially since I'd like to undo the split(' ') special case anyway
> >  and use a different notation for word splitting.
> 
> Still, argumentless split probably defaults to something. And ' ' is a
> good thing to default to, IMO. It doesn't have to be a special case. In
> fact, it not being a special case makes the symmetry less false, and
> would --if ' ' is the default-- make the case even stronger for join to
> default to ' ' too.

I think that '' is the best default case for both split and join in Perl 6.

They would be symmetrical because they are both ''.

And the space character is really a rather arbitrary looking value 
for a default and is equally valid with, say, the line break, so how 
can one say it is better?

-- Darren Duncan
Thread:
Thomas Klausner
Ingo Blechschmidt
Larry Wall
Juerd
Larry Wall
Juerd
Rod Adams
Darren Duncan
Juerd

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved