On Fri, 29 May 2009, Jon Lang wrote:

On Fri, May 29, 2009 at 6:53 PM, Darren Duncan <dar...@darrenduncan.net> wrote:
I had some thoughts lately about the Perl 6 operators, and wanted to bounce
some ideas.

--------

Firstly, regarding the string replication ops as documented in Synopsis 3,
'x' and 'xx', I'm wondering whether it might be better to have something
that incorporates a '~', since that operation is about catenation.

Would perhaps '~*' work better than 'x' to signify better what the operation
is doing; the '~' in this case means catenation and the '*' is meant to
invoke 'multiply', not 'whatever'.  So '~*' means "catenate a multiple of
times".

This would then free up 'x' to be used for something else, if anything.

As for a substitution for 'xx', I'm less sure about that.

Thoughts?

I wouldn't mind 'x' becoming '~x' and 'xx' becoming 'x'; it strikes me
as a lot more intuitive - and I've wanted to see this done for a while
now.  I suppose that you might also introduce a '?x' and/or a '+x' to
complete the set, though for the life of me I can't think of how
they'd work or what they'd be good for.

        How about if xx became x, and then we did things like:

        [~] @list x $count

        ...to get the string replciation?

        HTH,


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayl...@wayland.id.au    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

Reply via email to