Luke Palmer wrote:
% 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.

I can think of one case where % would be preferable to 'mod': when you
want to ask for a 'remainder' in the form of a non-integer.  That is,
'4.5 % 3' returns 1.5 (and parallels '/'), while '4.5 mod 3' returns 1
(and parallels 'div').  That said, if it's decided that the latter
definition is inappropriate or unnecessary, then I'd be all in favor
of completely dropping '%' in favor of 'mod' for the former

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

Hear, hear.  Huffman coding is all well and good; but not when taken
to the point that it starts interfering with legibility.  That said,
six-character words are the longest that I'd want to see, and I'd much
prefer three- or four-character words if reasonable.

Mind you, there are some cases where I'd like to see the symbol-based
operators supplemented by name-based ones instead of being replaced by
them.  For instance, I could live with a few more word-based
contextualizers: 'scalar' (same as '$:'), 'hash' (same as '%:'), and
'nested' (same as '@@:'); but I wouldn't want to remove '$:', '%:', or
'@@:'.  The only reason I don't also suggest 'sub' to supplement '&:'
is the confusion that could arise between contextualization and

Jonathan "Dataweaver" Lang

Reply via email to