> This is not a theoretical concern.  If someone, at some point, defines sub
> CGI {} your constructor suddenly fails.  If you're using something along the
> lines of Animal::Bear->new(), and the author of Animal.pm defines a Bear()
> method, your constructor suddenly fails.  This is action at a distance.
> It's a pain.

You miss my point. I'm not arguing that. I'm arguing that this:

   $SIG{PIPE} = Plumber;  # "Plumber" or Plumber()?

Is just as much of a pain because of action-at-a-distance. Solving this
problem with highly-specific solutions gains us nothing but more
syntactic inconsistencies and ambiguities, like these:

   stat->{'mode'}
   stat->mode

working massively differently. That's confusing!! It is!!! Really.

We need to step back and fix the *problem*: barewords vs. functions are
ambiguous. In *all* contexts. Always. You can screw yourself with any of
these equally:

   $SIG{TERM} = IGNORE;    # "IGNORE" or IGNORE()?

   print output @stuff;    # print(output(@stuff))
                           # or output->print(@stuff)?

   $r = new CGI;           # new(CGI) or CGI->new?
   $q = CGI->new;          # "CGI"->new or CGI()->new?

   $name = first . middle; # "firstmiddle" or
                           # first() . middle()?

   $total = number + 42;   # number() + 42 or
                           # "number" + 42?

These are *all* action at a distance. The problem has nothing to do with
->. The fix shouldn't either.

The problem is this: barewords and functions are ambiguous. Always.
*ALL* contexts. What we *don't* need is a bandaid holding on a severed
limb (RFC 244). What we do need is a way to fix the actual problem,
which this RFC addresses. Perl is already too hard and inconsistent
enough. 

-Nate

Reply via email to