Experiences/guidance on teaching Python as a first programming language
Rhodri James
rhodri at wildebst.org.uk
Wed Dec 18 19:10:04 EST 2013
On Wed, 18 Dec 2013 14:55:10 -0000, Chris Angelico <rosuav at gmail.com>
wrote:
> On Wed, Dec 18, 2013 at 11:53 PM, Dave Angel <davea at davea.name> 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?
Because explicit is better than implicit?
--
Rhodri James *-* Wildebeest Herder to the Masses
More information about the Python-list
mailing list