Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Why not allow empty code blocks? Date: Sat, 30 Jul 2016 23:51:31 -0400 Lines: 34 Message-ID: References: <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579cbded$0$1605$c3e8da3$5496439d@news.astraweb.com> <758a1961-00bc-4b1c-834b-a7deca94d029@googlegroups.com> <1469937091.1073724.681536537.7B23B6E2@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de jIuygfCSdNKDgkKTHSefag+s4rZcr6Qceq6jDL/6ZXQA== 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; 'static': 0.03; '"as': 0.07; 'statically': 0.07; 'subject:code': 0.07; 'api': 0.09; 'merged': 0.09; 'none"': 0.09; 'received:internal': 0.09; 'subject:Why': 0.09; 'typed': 0.09; 'python': 0.10; 'subject:not': 0.11; 'syntax': 0.13; 'argument': 0.15; 'languages.': 0.15; '"always': 0.16; 'distinction': 0.16; 'general.': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'personally,': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:allow': 0.16; 'wrote:': 0.16; 'typing': 0.18; 'int,': 0.22; 'decide': 0.23; 'sat,': 0.23; '(this': 0.24; 'header:In- Reply-To:1': 0.24; 'all.': 0.24; "doesn't": 0.26; '(which': 0.26; 'chris': 0.26; 'function': 0.28; 'values': 0.28; 'callable': 0.29; 'does,': 0.29; 'objects': 0.29; 'url:mailman': 0.30; "can't": 0.32; 'url:python': 0.33; 'url:listinfo': 0.34; 'languages': 0.34; 'functions.': 0.35; 'returning': 0.35; 'something': 0.35; 'but': 0.36; 'url:org': 0.36; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'really': 0.37; 'two': 0.37; 'difference': 0.38; 'received:66': 0.38; 'mean': 0.38; 'end': 0.39; 'means': 0.39; 'rather': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'called': 0.40; 'some': 0.40; 'care': 0.60; 'header:Message-Id:1': 0.61; 'default': 0.61; '30,': 0.63; 'more': 0.63; 'different': 0.63; 'between': 0.65; 'fall': 0.66; 'fundamental': 0.66; 'statement,': 0.66; 'jul': 0.72; 'special': 0.73; '(once': 0.84; 'chrisa': 0.84; 'distinguish': 0.84; 'kind.': 0.91; 'spell': 0.91 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=s3a0A6KGZ0UENb/cj17XqJpCwBs=; b=I48vD4 RknruW8AO+Xi3NJdWGipFqcfnRT/inW6eNqOTPDDUNmWbbG7Pg5kq35uNs3tDQed 4Cf4OFYi5nAWKIfuhnc3Bxa9J2O1o3768E4pjEApSiIt95dkpWer838b1EVqXhX/ Ip1iX8Pv4gx6WmXLbOMPv4hUK0ejZqXJRDYaA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=s3a0A6KGZ0UENb/ cj17XqJpCwBs=; b=Q8tXYXhhSaCpK+gLH4pCRKDjmgQd6MR9toBNLdnvO4XK3kT K46q4DCYweqvu2SnnYF1fVFsS6wqMte4M4FaZF250UUAPp6c0YmDqPDw5IvfuZwJ yr7rbzz8XDjFYgjs/jaCgEmPsKMJ+CFIPb1izBVca5mrpGuT+uh2FQ32nd5E= X-Sasl-Enc: +9iH2gQFYZPvdmOn8w7eQAIKYtX9tDGfFxBToy0+jPQe 1469937091 X-Mailer: MessagingEngine.com Webmail Interface - ajax-501c3c37 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1469937091.1073724.681536537.7B23B6E2@webmail.messagingengine.com> X-Mailman-Original-References: <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579cbded$0$1605$c3e8da3$5496439d@news.astraweb.com> <758a1961-00bc-4b1c-834b-a7deca94d029@googlegroups.com> Xref: csiph.com comp.lang.python:112116 On Sat, Jul 30, 2016, at 22:17, Chris Angelico wrote: > Yeah. The distinction means you have a fundamental API difference > between the procedures (which don't return anything) and the functions > (whose return values you mightn't care about). Not really any more than between functions returning different types - which python doesn't distinguish in general. That some languages may spell it with a different keyword rather than a special type [such as C's void] doesn't mean the fundamental API difference is of a different kind. > It means you can't > upgrade something from "always returns None" to "returns the number of > objects frobbed" without breaking compat. Well, that's something you can't do in general in statically typed languages. (Once upon a time, C had a default return type of int, and allowed functions returning it to fall off the end or have a "return;" statement, but not anymore). This is ultimately just the static typing argument in miniature, confused by the fact that some languages declare them with a different syntax from other functions. > Conversely, if you decide > that any function can be called "as a procedure" (this is what REXX > does, for instance), then you've just merged the two types of callable > and distinguished them only in usage. > > Personally, I don't see any value to the distinction at all. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list