|Welcome to the Monastery|
Re: We don't need a catby dingus (Friar)
|on Dec 17, 2002 at 09:59 UTC ( #220482=note: print w/replies, xml )||Need Help??|
We may not need a cat but we really do need an append (i.e the p6 equivalent of $string .= $appended_text) and if you have no cat operator then you can't have a nice append operator related to it. I suppose that if you rule that interpolation ("") is the way to go then you could go for "= but I think that would break many colouring editors not to mention cause a lot of people to get very confused.
Of course if you define cat as join('', list) then it might be reasonable to create an append($target, list) function but that does rather add to the verbiage AND change the way you look at the operation. To me, at least, opeators are cheap and quick functions are generally slower and more expensive. concatenate and append should IMO be looked on as cheap and quick because they are.
Another possibility that I just thought of while writing this is that append could be written using print $target list but that opens a whole can of mainainability worms as $target could either be a filehandle or a string and I see no easy way to make it clear which it is in a particular context.
PS For those who understand pantomime, does this thread sound a little familiar?
Enter any 47-digit prime number to continue.
In Section Meditations