Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53210

Re: Interface and duck typing woes

References <CAPTjJmrVkYJrauULk5zOd1C_7ztQ4CPYLPNYgE+9+Hh4uPNZ2Q@mail.gmail.com> <20130829012020.GA47225@cskk.homeip.net>
Date 2013-08-29 11:39 +1000
Subject Re: Interface and duck typing woes
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.343.1377740373.19984.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Aug 29, 2013 at 11:20 AM, Cameron Simpson <cs@zip.com.au> wrote:
> However, when working in Java its type strictness caught a great
> many simple brainfart logic errors by checking function signatures;
> typically calling the wrong function/method or mangling arguments.
> Getting this stuff up front was handy.

It certainly is useful, which is why I like a language with declared
types. But it's not everything, and it's certainly far from
sufficient. So once you've decided that run-time errors are normal,
you write code with that in mind (in a web server, for instance, you'd
have some code around the outside that catches and logs errors and
returns a 500 to the client), and then you don't stress about them.
Any you can catch early, do so, but don't put more effort into
catching errors early than you save by not having them later.

The novice thinks his primary job is to stop the program from
crashing. The expert knows that a crash is just another way for things
to go wrong, and one of the easiest to deal with.

ChrisA

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Interface and duck typing woes Chris Angelico <rosuav@gmail.com> - 2013-08-29 11:39 +1000
  Re: Interface and duck typing woes Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-29 02:48 +0000

csiph-web