develooper Front page | perl.perl6.language | Postings from April 2001

Re: Tying & Overloading

From:
H . Merijn Brand
Date:
April 23, 2001 05:32
Subject:
Re: Tying & Overloading
Message ID:
20010423143130.2BD4.H.M.BRAND@hccnet.nl
On Mon, 23 Apr 2001 13:19:24 +0100, Graham Barr <gbarr@pobox.com> wrote:
> > $a = $b ~ $c; # Mmm!
> > 
> > I like that last one a lot, because it doesn't disturb anything.
> > You'd have to alter ~'s precedence so that binary ~ is higher
> > than named unary operators. (It's print($a~$b), not print $a (~b).)
> 
> I am not sure I do like the use of ~ here. It does not screan concatenate
> to me (but then again neither did . when I started perl)
> 
> I am thinking that maybe it should be a 2 character operator with at
> least one of then being + as + is common in many other languages
> for doing concatenation.

like ++ ?

we have ** already for exponents

-- 
H.Merijn Brand    Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 623 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
     WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/




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