Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'argument': 0.05; 'run-time': 0.05; 'strict': 0.07; "django's": 0.09; 'subject: [': 0.09; 'subtle': 0.09; 'cc:addr:python-list': 0.11; 'language.': 0.14; 'agree.': 0.16; 'boolean': 0.16; 'bucket': 0.16; 'declarations': 0.16; 'elephant': 0.16; 'expecting': 0.16; 'ignoring': 0.16; 'integer,': 0.16; 'somewhere.': 0.16; 'subject:"]': 0.16; 'unexpectedly': 0.16; 'language': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'wed,': 0.18; 'passing': 0.19; 'seems': 0.21; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'subject:problem': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'source': 0.25; '>': 0.26; 'references': 0.26; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'compared': 0.30; 'message- id:@mail.gmail.com': 0.30; 'accidentally': 0.31; 'constant': 0.31; 'object.': 0.31; 'stuff': 0.32; "we're": 0.32; 'totally': 0.33; 'could': 0.34; 'subject:with': 0.35; 'except': 0.35; 'johnson': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'method': 0.36; 'wrong': 0.37; 'list': 0.37; 'easily': 0.37; 'skip:& 10': 0.38; 'even': 0.60; 'around.': 0.60; 'most': 0.60; 'conversion': 0.61; 'numbers': 0.61; 'kind': 0.63; 'our': 0.64; 'subject:The': 0.64; 'to:addr:gmail.com': 0.65; 'it!': 0.67; 'believe': 0.68; 'calculations': 0.84; 'float,': 0.84; 'room.': 0.84; 'subjected': 0.84; 'try,': 0.84; 'wrong!': 0.84; 'rick': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Ec9QZTzfUHFOItdpE/Fmz0tBfFHA69VaC7c2tr+l4bg=; b=KLYHSqSa58u4MfN8Q0CQS0UtOlZMQV5RI5BwIClA95c2TDhnQGLP6qxapRMUXY+313 g/NUUot2zDBwEfIdfCtwJ3pvgrcslhI58IuSmKft6DL0uGqUckRKmR+lZ1zB/HdacPbi bZimSvRF1+rdN7yw+ogDfWYQJoS637+zjQNcV5bGZonpIlK5ZMGhD7AD9vfW9k5l+aig CQNqVe7Dl5TYA4UXzx8DrbA0HKXuzVOML01cowOhHXOAZheeO8jtgotZ0gBkS1lnQKng YDqqcN0vGc6mY2L5uJEBORcxlOFJBYZ78Pol/slq3MwOaFmXN/H+LE+ITTLqaySuiQMc AOMg== MIME-Version: 1.0 X-Received: by 10.229.106.162 with SMTP id x34mr7335938qco.68.1370362255229; Tue, 04 Jun 2013 09:10:55 -0700 (PDT) In-Reply-To: References: <687dea63-84da-4c45-9366-cb5a10665d1f@googlegroups.com> <51ab95d5$0$29966$c3e8da3$5496439d@news.astraweb.com> <51ad7daf$0$11118$c3e8da3@news.astraweb.com> Date: Tue, 4 Jun 2013 17:10:55 +0100 Subject: Re: Bools and explicitness [was Re: PyWart: The problem with "print"] From: =?ISO-8859-1?Q?F=E1bio_Santos?= To: Chris Angelico Content-Type: multipart/alternative; boundary=0023543329e66fcf2d04de5653bf Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 70 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370362263 news.xs4all.nl 15983 [2001:888:2000:d::a6]:33930 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46935 --0023543329e66fcf2d04de5653bf Content-Type: text/plain; charset=ISO-8859-1 On 4 Jun 2013 17:04, "Chris Angelico" wrote: > > On Wed, Jun 5, 2013 at 1:44 AM, Rick Johnson > wrote: > > But we are really ignoring the elephant in the room. Implict > > conversion to Boolean is just a drop in the bucket compared > > to the constant "shell game" we are subjected to when > > reading source code. We so naively believe that a symbol > > named "lst" is a list object or a symbol "age" is a integer, > > when we could be totally wrong! This is the source of many > > subtle bugs!!! > > You know, if you want a language with strict type declarations and > extreme run-time efficiency, there are some around. I think one of > them might even be used to make the most popular Python. Give it a > try, you might like it! There's NO WAY that you could accidentally > pass a list to a function that's expecting a float, NO WAY to > unexpectedly call a method on the wrong type of object. It would suit > you perfectly! > I agree. I have never had this kind of issues in a dynamic language. Except when passing stuff to Django's fields. And in JavaScript. It seems like the thing was made to create references to `undefined`. And make them easily convertible to numbers and strings so that our calculations mysteriously fail when we're missing a function argument somewhere. --0023543329e66fcf2d04de5653bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On 4 Jun 2013 17:04, "Chris Angelico" <rosuav@gmail.com> wrote:
>
> On Wed, Jun 5, 2013 at 1:44 AM, Rick Johnson
> <rantingrickjohnson= @gmail.com> wrote:
> > But we are really ignoring the elephant in the room. Implict
> > conversion to Boolean is just a drop in the bucket compared
> > to the constant "shell game" we are subjected to when > > reading source code. We so naively believe that a symbol
> > named "lst" is a list object or a symbol "age"= ; is a integer,
> > when we could be totally wrong! This is the source of many
> > subtle bugs!!!
>
> You know, if you want a language with strict type declarations and
> extreme run-time efficiency, there are some around. I think one of
> them might even be used to make the most popular Python. Give it a
> try, you might like it! There's NO WAY that you could accidentally=
> pass a list to a function that's expecting a float, NO WAY to
> unexpectedly call a method on the wrong type of object. It would suit<= br> > you perfectly!
>

I agree. I have never had this kind of issues in a dynamic l= anguage. Except when passing stuff to Django's fields. And in JavaScrip= t. It seems like the thing was made to create references to `undefined`. An= d make them easily convertible to numbers and strings so that our calculati= ons mysteriously fail when we're missing a function argument somewhere.=

--0023543329e66fcf2d04de5653bf--