Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'static': 0.04; 'incompatible': 0.07; 'alain': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'type,': 0.09; 'unhandled': 0.09; 'developer': 0.10; 'python': 0.11; 'question.': 0.14; 'argument.': 0.16; 'bitwise': 0.16; 'garbage': 0.16; 'no...': 0.16; "object's": 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'run-time.': 0.16; 'worst': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'seems': 0.21; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'char': 0.24; 'junior': 0.24; 'java': 0.24; 'developing': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'code': 0.31; 'raised': 0.31; 'types.': 0.31; 'probably': 0.32; 'could': 0.34; 'problem': 0.35; 'possible.': 0.35; 'objects': 0.35; 'test': 0.35; 'but': 0.35; 'add': 0.35; 'next': 0.36; 'needed': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'full': 0.61; 'happen': 0.63; 'side': 0.67; 'qualified': 0.72; 'safe': 0.72; 'received:178': 0.74; 'subject:This': 0.74; 'analysis': 0.75; 'lack': 0.78; 'dismissed': 0.84; 'dozens': 0.84; 'float,': 0.84; 'launch,': 0.84; 'leaders,': 0.84; 'silently': 0.84; 'journals': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Sturla Molden Subject: Re: OT: This Swift thing Date: Fri, 06 Jun 2014 01:54:32 +0200 References: <8738fjkc2w.fsf@dpt-info.u-strasbg.fr> <87y4xbitfy.fsf@dpt-info.u-strasbg.fr> <87ppinhzjt.fsf@dpt-info.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: ip-155-53-72-178.dialup.ice.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <87ppinhzjt.fsf@dpt-info.u-strasbg.fr> 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1402012487 news.xs4all.nl 2903 [2001:888:2000:d::a6]:37538 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72794 On 05/06/14 22:27, Alain Ketterlin wrote: > I have seen dozens of projects where Python was dismissed because of the > lack of static typing, and the lack of static analysis tools. If you are worried your code will bring down the next Ariane launch, I can understand this argument. If you are only worried a junior developer will make stupid mistankes that the test suite will trap, then no... In Python you cannot spoof an object's type, which means the type safety is strong. You cannot make Python silently return bytes of garbage by using objects of incompatible types. You cannot add a char to a float, and you cannot make a bit be treated bitwise as a float. You cannot make Python silently treat four bytes as an int. The worst thing that can happen is a TypeError raised at run-time. Yes, an unhandled TypeError exception could in theory bring down Ariane. But you are probably not developing for it. When is static analysis actually needed and for what purpose? The problem seems to be that managers, team leaders, CEOs, or (insert your favorite tite), are not qualified to answer this question. So to be on the safe side they go for as much static analysis as possible. But still they avoid Ada, because, you know, the journals they read are full of Java buzzwords. Sturla