Thom Boyer wrote:

> Smylers [mailto:[EMAIL PROTECTED]] wrote:
> 
> > And an alternative spelling for the assignment operator[*0] doesn't
> > strike me as something Perl is really missing:
> > 
> >   $msg <~ 'Hello there';
> >   $msg = 'Hello there';
> 
> I still remember the first time I saw a computer program ...:
> 
>   N = N + 1
> 
> ... "That sure isn't true for any value of N that *I* know of!" ...
> I've always been bothered by this misuse of mathematical notation, ..

In this respect I was fortunate that the first language I saw was
a Basic[*0] dialect which used C<LET>:

  LET n = n + 1

which avoids much of the confusion, at the annoyance of having to type a
keyword for such a common operation.  I at least slightly share your
botheredness -- I found it distinctly odd when I first saw the C<LET>
being dropped -- but try not to think about it most of the time, having
just got accustomed to the "misuse".

  [*0]  Please note I'm specifically _not_ commenting on how fortunate
  or otherwise that was in _other_ respects.

> I always thought that "<-" was much better ...  I, for one, could live
> with "<~" as the only assignment operator. But I only suggest it
> tongue in cheek.

My first version of the message you quoted above had a footnote with
exactly that tongue-in-cheek suggestion, saying that, as an alternative,
if right-left streams are to be kept then could we drop C<=>.

This has several plausible-sounding advantages, including the one you
highlight, making assignment completely reversible (allowing statements
which emphasize the value rather than the variable having equal status
to the usual way round), and avoiding the common beginner confusion of
trying to use C<=> to test for equality.

But then I remembered assignent short-cut operators.  

  $msg ~<~ "Your current balance is $total.\n";

Regardless of where your font puts the squiggles, I just don't see that
looking like a concatenation operator ...

Smylers

Reply via email to