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

Re: Semantics of vector operations

Thread Previous | Thread Next
A. Pagaltzis
January 22, 2004 13:16
Re: Semantics of vector operations
Message ID:
* Larry Wall <> [2004-01-22 18:40]:
> You might argue that we should force people to think of it one
> way or the other.

I wouldn't, because if I did I'd should've been talking to Guido
rather than you in the first place. :-)

And because I'm talking to you, I'll wonder whether maybe we
ought to have both options.

> I'd argue that vectorization is not something that happens to
> *either* the operand or the operator.  Vectorization is a
> different *relationship* between the operator and the operand.
> As such, I still think it belongs between.

That makes a lot of sense; consider me convinced.

Even if I agree after all though, that doesn't make me like the
way »+ and particularly +« look any more than I liked them
before. I usually scoff at "line noise" remarks, but in this case
I'd feel forced to mutter it myself -- it just continues to feel
like too big a change in behaviour dictated by a single "magic

While »+« is a little ugly as well, it does stand out boldly,
something that could not IMHO be said about the one-sided
variants. I'd argue that we really should use something more
visually prominent for the one-sided case.

Maybe »»+ and +«« or something? But the non-Unicode variant would
be, uh, less than pretty.

> Plus, in the symmetrical case, it *looks* symmetrical.  Marking
> the args in front makes everything look asymmetrical whether it
> is or not.

I was actually thinking something like

    »$a« + »$b«

in which case asymmetry would not be an issue.

"If you can't laugh at yourself, you don't take life seriously enough."

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About