develooper Front page | perl.perl6.language | Postings from May 2001

:::: instead of qw// ?

From:
Me
Date:
May 10, 2001 02:02
Subject:
:::: instead of qw// ?
Message ID:
02a401c0d92e$e05d2e60$6501a8c0@me
My apologies if the following has already been suggested.

I know Larry said the colon was his, but presumably he's
not talking about the double colon, as currently used as a
package name separator, right?

What if:

    use Foo::Bar qw/ qux waldo /;

can be written:

    use Foo::Bar :: qux waldo ::;

Some disadvantages:

    o :: You can hardly see the double colons ::
    o Four shifted keystrokes.
    o There's ambiguity over what i:: means.

Some plausible advantages:

    o The double colons echo the use of double colons as
      a separator in package (module) names, one of the
      most visible places that qw// gets used.

    o The four keystrokes are repeats.

    o The invisibility might sometimes be a good thing.

      In particular, I think the low noise works nicely on a
      'use' (or 'mod' or whatever) line, which is in turn a
      good place (at the top of scripts) to reduce noise.

      It's plausible it might work nicely in at least some
      instances elsewhere in code. After all, one of the
      reasons to use qw// is to reduce noise that detracts
      from the words themselves.

      You will of course have qw// available if you need it.

    o Saves any other character(s) that might be used for
      replacing qw//.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About