On 2/21/07, Thomas Wittek <[EMAIL PROTECTED]> wrote:
Damian Conway schrieb:
> If the very much more readable 'zip' and 'minmax' are
> to be replaced with 'ZZ' and 'MM', then I think that's a serious step
> backwards in usability.

Fully agree here and I think that there are still even more places,
where the usability could be improved:
Say more words/letters, less symbols/special characters.
Especially special characters (shift + num: [EMAIL PROTECTED]&*...) are harder 
type (I think I can type a 5-char word a lot faster than shift-5 = % -
additionally the shift-wrench disturbs the typing flow) and above all
harder to read/intuitively understand/learn/remeber than plaintext keywords.

Well, (IMO, of couse, but I can defend it!) typability is not nearly
as important as readability.  And not Java readability, where you can
right-click on anything and read the documentation, but readability
where, after sufficient orientation, you can look at most and not need
any documentation; i.e. it is completely obvious what it is doing.
Many times this can not be done simply by naming appropriately,
although I admit Perl often takes this too far.

Of course there will always be a trade-off and special characters are
the most usable choice in many cases. But I also think that in many
other cases "words" will be more usable.

% as the "mod" operator is a good example of what you describe.
There's no need for mod to be a symbolic operator: when you read 5 % 3
you say "5 mod 3".  Why would we not write "5 mod 3": it is just as
obvious what and how we are doing this operation.  And % is uncommon
enough that no huffman coding principals may apply.  The only thing we
have here is cultural baggage.

As a good example of what I am referring to is hyper operators.
Naming hyper operators would ultimately be detremental to readability
among experienced programmers.  Consider the difference between:

   my @data = @reading >>+<< @bias;   # old hyper syntax; I don't
know the new form yet
   my @data = hyper &infix:<+>, @reading, @bias;

In which one of these is it more obvious what is going on?  Now, if
you're a beginner, neither may be totally obvious, but the first makes
you think of addition, and the second makes you think of function

As the usability of a tool greatly influences it's acceptance and usage,
this is a point, where we really should think about.

I completely agree.  I am for operator-centric languages.  As a
mathematician and a human, I think an operator-centric language maps
very closely to my brain, as opposed to a name-centric language (for
some reason, I'm not sure why, but as an experienced perl and ruby
programmer, perl just "flows" better).  But I do think that Perl 6 is
gathering some operator bloat, in that we are defining symbols for
things that are not adding to the "obviousness" of the code.  They may
not be taking away, but all else being equal, we should choose the
option of lower abstraction (as far as what level the user needs to be
in order to understand what is *really* going on, for some definiton
of "really").


Reply via email to