Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!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.126 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.02; 'subject:Python': 0.06; 'subject:language': 0.09; 'sure,': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'marker': 0.16; 'subject: \n ': 0.16; 'subject:programming': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'wed,': 0.18; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'pointer': 0.24; 'cc:2**0': 0.24; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'division': 0.31; 'struct': 0.31; 'figure': 0.32; "we're": 0.32; 'could': 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'useful': 0.36; 'should': 0.36; 'so,': 0.37; 'two': 0.37; 'being': 0.38; 'auto': 0.38; 'pm,': 0.38; 'dave': 0.60; 'middle': 0.60; "you're": 0.61; 'information': 0.63; 'valuable': 0.63; 'different': 0.65; 'funny': 0.74; 'potentially': 0.81; 'adorn': 0.84; 'local,': 0.84; 'angel': 0.91; 'thing,': 0.91; 'to:none': 0.92; 'choice.': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=SbBdYCyXAdB1fKgXFQdZmu/YnvmAcoz1MTkXdZD13K0=; b=du8iJrwOWhS4cCaIPIci2W+HKN3DRARS61ChIQOBKl7wjNXzr/cRT/VZYWiT/NZ82+ 7j0j1pmsSo7nek6lhFqpZONZZNRC168FVww3lUrEAhzy8ItwD1swMqK3VpI8rM1korE8 Uxv+FVG1MnSsWCMam4jzjmvU8oFgBjkwiMRGGNn0chdUy7Athpzx0yvJN0KiPBBpEWAT xK3bufbw4AwZC8EEstKmfhp4lACjp/dFa9cAq0CV1uaOhX8+n55uW6CuiDia7KJZXKj1 eMSno3hJ42/oYwaq0x2+f5Ho/z/pP6mEJjjlMtRBTT9tas3IPC5Fu9zcEmhFhdbOdBxQ yRuA== MIME-Version: 1.0 X-Received: by 10.68.108.194 with SMTP id hm2mr34955250pbb.22.1387378510915; Wed, 18 Dec 2013 06:55:10 -0800 (PST) In-Reply-To: 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> Date: Thu, 19 Dec 2013 01:55:10 +1100 Subject: Re: Re: Experiences/guidance on teaching Python as a first programming language From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387378514 news.xs4all.nl 2948 [2001:888:2000:d::a6]:50512 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62308 On Wed, Dec 18, 2013 at 11:53 PM, Dave Angel wrote: > 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. Sure, but you can figure out whether p is a local struct or a local pointer to some other struct by looking at its declaration. Do you also need to look at every usage of it? We don't adorn every / with a marker saying whether we're dividing ints or floats, and that's something that could be potentially useful (float division of two ints being what Py3 does). Why adorn pointer usage? ChrisA