On Tue, Aug 15, 2000 at 05:45:04PM -0400, Karl Glazebrook wrote:
> I hope people will actually read the RFC before coming back with these
> canned responses which I (and presumably everyone else on this list)
> am completely familiar with. I used to believe that too! Honest...

I think you do a significant disservice to brush off criticism so
blithely.  Complaining that anyone who disagrees with you has not read
the RFC is unlikely to garner much support.


Line noise or not, I like the type prefixes.

I like being able to treat arrays and hashes differently from other
things.

  snrub($a);
  snrub(@a);
  snrub(%a);
  snrub(@$a)
  snrub(%$a)

Each one of these does something different.  I know, just by looking
at the expression, with absolutely no further knowledge of what the
function and variable involved are, the general nature of what is
going on.  I know whether the function is receiving one argument or
several.  I can make reasonable assumptions about what will happen
to the contents of the variable.  I know something about what
operations I can perform on the variable.

If your proposal goes through, how will I perform these operations?
What will "snrub(@a)" become?  If we just turn all the @%s into $s,
then it becomes "snrub($a)" -- and now snrub is being passed a
variable number of arguments, and I have no way to tell this without
more context.  Maybe we can keep the @{} syntax -- but now you need
to say @$a where you before said @a, and the line noise has increased,
not decreased.

The real problem in the above is context -- when I see @a or %a, I
know that it will behave in one fashion in list context, and another
in scalar context.  $a, on the other hand, may be trusted to remain
the same no matter what the context.  Indeed, I'd say that all the
line-noise puncuation is one of the things that makes context
bearable.

Perhaps we should remove context?  Sure, you won't be able to test
for @a == 5 any more, but we can just rewrite that as $a->length == 5.
At this point, there isn't much need for the $, though, so we
can just say a->length == 5.  That -> is ugly, though; maybe we can
turn it into a . like the rest of the world, at which point we're
every bit as good as Python!

Y'know, I like Python.  Lot of nice things in that language.  Maybe
we should all jump over to their mailing lists rather than wasting
our time with Perl 6.

                       - Damien

Reply via email to