Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Undefined behaviour in C [was Re: The Cost of Dynamism] Date: Sun, 27 Mar 2016 09:47:08 -0400 Organization: IISS Elusive Unicorn Lines: 36 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 8kuKOH7gRJUQSX4vxysOzg4tnpxL5mNGPJC6vzA8QpCw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'calls.': 0.07; 'defines': 0.07; 'modifying': 0.07; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'explicitly': 0.15; '"def"': 0.16; '2016': 0.16; '>on': 0.16; '>they': 0.16; 'expressions.': 0.16; 'iirc': 0.16; 'in-line': 0.16; 'latter,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subroutine': 0.16; 'value),': 0.16; 'wrote:': 0.16; 'url:home': 0.18; '>>>': 0.20; 'explicit': 0.22; 'paul': 0.24; 'header:X -Complaints-To:1': 0.26; 'error': 0.27; 'equivalent': 0.27; 'function': 0.28; 'subject: [': 0.29; 'statement': 0.32; 'except': 0.34; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'received:org': 0.37; 'suggestion': 0.37; 'charset:us-ascii': 0.37; 'front': 0.38; 'to:addr:python.org': 0.40; 'behavior': 0.61; 'subject:The': 0.61; 'mar': 0.65; '>you': 0.84; 'dennis': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-79-217-212.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES 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:105838 On Sun, 27 Mar 2016 12:31:26 +0100, BartC declaimed the following: >On 27/03/2016 07:34, Paul Rubin wrote: >> BartC writes: >>> But my suggestion was to have required a keyword in front of >>> such expressions. >> >> Should there be a keyword in front of a line containing "sqrt(x)" ? >> What about "launch(missiles)" ? > >They both look like function calls. Function calls are *very* commonly >used as standalone expressions. > >You /could/ stipulate that they be written: > > call launch(missiles) # like Fortran iirc > Except that FORTRAN also explicitly defines them as subroutine xxx() vs return-type function yyy() and will generate a compile error if you "call" the latter, or put the former in-line of an expression This would be the equivalent of removing "def" from Python, and adding two new keywords: "sub" and "fun"; modifying the behavior so that "fun"s must have an explicit return statement (preferably with an explicit return value), whereas "sub"s have no return and just ... end... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/