Perl is worse!

Steve Lamb grey at despair.rpglink.com
Fri Jul 28 11:07:09 EDT 2000


On Fri, 28 Jul 2000 09:21:28 GMT, Ben Wolfson <rumjuggler at cryptarchy.org> wrote:
>Well, what if you wanted 
>	1 + "1"
>to result in "11", not 2?

    Then cast it as a string operation explicitly.  The point is that it is
easier to cast the exceptions rather than as the rule.  

>That could lead to some interesting results if you expect numerical input.

    Yes it could, that is why good programmers check their input data before
performing opertions when the data set is not trusted.  I'm amazed that people
in this thread have repeatedly stated things like, "Well, if it did that it
would work in design but a user would make it crap out."  Sorry, same thing
can be said for Python as well for any time user input is taken and the
variables are not checked before performing operations.  It raises an
exception all the way out (because if you assume a programmer doesn't check
their data, they don't check exceptions, either) and the program still craps
out.  I'd much rather the language assume I am intelligent enough to check
instead of assume I am not and question me on every single operation.

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list