Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!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.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.01; 'operator': 0.03; 'subject:Python': 0.06; 'context': 0.07; 'implements': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:language': 0.09; 'operators.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:programming': 0.16; 'syntactic': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'wed,': 0.18; 'header:User-Agent:1': 0.23; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'dec': 0.30; "d'aprano": 0.31; 'steven': 0.31; 'struct': 0.31; 'c++': 0.36; 'should': 0.36; 'so,': 0.37; 'two': 0.37; 'auto': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'middle': 0.60; "you're": 0.61; 'save': 0.62; 'information': 0.63; 'valuable': 0.63; 'different': 0.65; 'between': 0.67; 'subjectcharset:utf-8': 0.72; 'funny': 0.74; 'potentially': 0.81; 'local,': 0.84; 'received:myvzw.com': 0.84; 'valid,': 0.84; 'thing,': 0.91; 'choice.': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: =?UTF-8?Q?Re:_Experiences/guidance_on_teaching_P?= =?UTF-8?Q?ython_as_a_first_programming=0A_language?= Date: Wed, 18 Dec 2013 07:53:23 -0500 References: <20131212213602.806ef8fd2626ca6f34bc83d6@gmx.net> <20131216213225.2006b30246e3a08ee241a191@gmx.net> <20131217165144.39bf9ba1cd4e4f27a96893ca@gmx.net> <52b0fb4f$0$29973$c3e8da3$5496439d@news.astraweb.com> <52b15b62$0$29973$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 94.sub-70-208-163.myvzw.com In-Reply-To: <52b15b62$0$29973$c3e8da3$5496439d@news.astraweb.com> User-Agent: Groundhog Newsreader for Android 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387371137 news.xs4all.nl 2875 [2001:888:2000:d::a6]:51612 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62298 On 18 Dec 2013 08:22:58 GMT, Steven D'Aprano wrote: > On Wed, 18 Dec 2013 13:11:58 +1100, Chris Angelico wrote: > > The one differentiation that I don't like is between the . and -> > > operators. The distinction feels like syntactic salt. There's no context > > when both are valid, save in C++ where you can create a "pointer-like > > object" that implements the -> operator (and has the . operator for its > > own members). Funny you should say that in the middle of a discussion about lifetime. In C, when you do the -> thing, you're now in a different struct with a potentially different lifetime. If p is a local, with auto lifetime, then so is p.x So, although the two are mutually exclusive, there's valuable information hidden in the required choice. -- DaveA