From: Gavin Sinclair Date: 2002-09-11T08:03:21+09:00 Subject: Re: Larry Wall's comments on Ruby ----- Original Message ----- From: "Mike Stok" > In Ruby a variable's type tells us what it is, in Perl the operators > provide context as to what a scalar ought to be viewed as, and this > is why they need an "extra" set of comparison operators e.g. > > # perl > > $a = '123 '; > $b = 45; > > # $a + $b => 168 > # $a . $b => '123 45' > > # $a > $b => 1 > # $a gt $b => a false value > > I prefer the explicitness of ruby (requiring .to_?), and its overloading > of + isn't too surprising e.g. > > 2 + 2 => 4 > "123 " + "45" => "123 45" > [1,2,3] + [4,5] => [1, 2, 3, 4, 5] > > Mike > The >/gt dichotomy prevented me from ever grokking Perl. *That* was unnatural! Gavin