Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: Undefined behaviour in C [was Re: The Cost of Dynamism] Date: Sun, 27 Mar 2016 12:39:30 -0400 Lines: 23 Message-ID: References: <56f55e2e$0$1619$c3e8da3$5496439d@news.astraweb.com> <87wpoq1omm.fsf@elektro.pacujo.net> <56f5f81d$0$1585$c3e8da3$5496439d@news.astraweb.com> <87io0a6j1w.fsf@nightsong.com> <56f67ee3$0$1583$c3e8da3$5496439d@news.astraweb.com> <87poug5t0c.fsf@nightsong.com> <1344e2bf-15d2-412e-9512-b0aba800dada@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de I6bMOV8jCS5LGrjVZ8adGAFl+CtM/3b4lIZVK4caU36w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'used.': 0.05; 'mode,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'statements': 0.09; 'python': 0.10; 'jan': 0.11; '2016': 0.16; 'expression.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'statement.': 0.16; 'useless': 0.16; 'useless.': 0.16; 'wrote:': 0.16; 'essential': 0.20; 'not,': 0.22; 'disable': 0.22; 'explicit': 0.22; 'am,': 0.23; 'slightly': 0.23; 'split': 0.23; 'thus': 0.24; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; 'subject: [': 0.29; 'print': 0.30; 'useful': 0.33; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'some': 0.40; 'subject:The': 0.61; 'received:96': 0.63; 'different': 0.63; 'march': 0.64; 'batchelder': 0.84; 'dialects.': 0.84; 'ideas.': 0.84; 'utc-4,': 0.84; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-96-227-207-81.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <1344e2bf-15d2-412e-9512-b0aba800dada@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105860 On 3/27/2016 11:48 AM, Ned Batchelder wrote: > On Sunday, March 27, 2016 at 10:43:49 AM UTC-4, BartC wrote: >> whether fn has an explicit return or not, and not allowing: >> >> fn # and other kinds of expression >> >> unless some keyword is used. > > Python *could* have made it an error to have a useless expression as a > statement. In interactive mode, which is an essential part of Python, expression statements print the value of the expression. Thus no expression is useless. So Bart is proposing to either disable an extremely useful feature or split Python into two slightly different dialects. I think both are bad ideas. -- Terry Jan Reedy