Re: Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread Rhodri James
On Wed, 18 Dec 2013 14:55:10 -, Chris Angelico wrote: 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. I

Re: Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread Dave Angel
On Thu, 19 Dec 2013 01:55:10 +1100, Chris Angelico wrote: 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? C is a glorified macro assembler. So the -> operator is not

Re: Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread Chris Angelico
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