develooper Front page | perl.perl6.language | Postings from January 2004

Re: Semantics of vector operations

Thread Previous | Thread Next
From:
Larry Wall
Date:
January 21, 2004 11:33
Subject:
Re: Semantics of vector operations
Message ID:
20040121193326.GB2977@wall.org
On Wed, Jan 21, 2004 at 03:21:01PM +0100, A. Pagaltzis wrote:
: That said, I'm not sure how keen I am on the idea of "one-sided"
: vector operators. It seems to me that this is too big a
: semantic choice to make merely by omission of a single (and quite
: dainty) character. I'd rather express this by forcing a context
: on the operand. The precedent so far also seems to be a
: rule-of-thumb that "I have to write more when I want to be
: explicit".

But I would argue that it's the vectorization of the argument that
is special, and that's precisely why it should only be used on the
argument that is to be considered "plural".  The underlying psychology
here is that most people assume that all these operators take scalar
(singular) arguments.

Now, a mathematician might assume otherwise, but said mathematician
will probably put "use vectorops" at the front and leave out all the
"dainty" characters from the get-go.

Larry

Thread Previous | Thread Next


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