[OT] Perl woes
Avleen Vig
avleen at gmail.com
Thu Jan 29 03:06:10 GMT 2009
On Wed, Jan 28, 2009 at 2:02 PM, Peter Corlett <abuse at cabal.org.uk> wrote:
> $ python
> Python 2.5.2 (r252:60911, Aug 6 2008, 09:17:29)
> [GCC 4.3.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> '1' + '2'
> '12'
>>>> 1 + 2
> 3
>>>> 1 + '2'
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: unsupported operand type(s) for +: 'int' and 'str'
Ruby is the same:
[avleen at avleen-mb] ~ $ irb
>> 1 + 2
=> 3
>> '1' + '2'
=> "12"
>> 1 + '2'
TypeError: String can't be coerced into Fixnum
from (irb):3:in `+'
from (irb):3
> (My complaints about Python are in other annoying corners of the language.)
Just curious, what else annoys you?
Feel free to reply off list, but I think there's merit to discussing
(constructively, in a non-flame way!) other languages and what we do
and don't like about them.
More information about the london.pm
mailing list