[Tutor] Teaching computer programming

Martijn Faassen M.Faassen@vet.uu.nl
Mon, 12 Apr 1999 10:38:03 +0200


Tim Peters wrote:
> 
> [Martijn Faassen]
> > ...
> > You only change the way they point. labels don't have a content, they
> > just point. That's what is confusing about a label; in the real world,
> > you label something, and you then don't pull off the sticker and put it
> > on another box, generally.
> 
> Think of people and their many names.

[snip good example where people are referred to in many different ways.
Especially 'next' is a good example of what you'd see in many programs]

> > You also don't tend to label the same box twice.
> 
> Martijn, Mr. Fassen, dad, son, Mrs. Fassen's husband, "hey, you!" -- we all
> get lots of labels over the course of a day.

I'm not a box! Also some of those labels don't apply to me (unmarried,
childless) Also it's 'Faassen'. Nitpick nitpick :) 
> > ...
> > But of course it's contrived; there must be a metaphor combining the
> > advantage of labels with the advantage of people somewhere. :)
> 
> I'm not sure people have *any* advantages <wink>, but names are to people as
> references are to objects.  Plus "immutable people" is familiar to anyone
> with a boss <wink>.

I like the way we now compare references in natural languages 'that box'
'the next guy', 'that thing over there', 'it', to reference variables.
That is a much more natural fit. 'labels' can be misinterpreted as the
physical thing you can stick on boxes, and people pointing places is
just plain confusing. I'd been pondering synonyms/homonyms as a way to
try to explain things, but concluded this was too confusing.
 
Regards,

Martijn