A question on modification of a list via a function invocation

Rustom Mody rustompmody at gmail.com
Wed Sep 6 00:37:15 EDT 2017


On Wednesday, September 6, 2017 at 9:55:10 AM UTC+5:30, Chris Angelico wrote:
> On Wed, Sep 6, 2017 at 2:17 PM, Rustom Mody wrote:
> > Well ⅓ the point of pointers may be printing them out — which even in a language
> > with 1st class pointers like C is rarely done/needed
> 
> But still the useless part. You don't actually *achieve* anything by
> printing out the pointer.
> 
> > Another ⅓ is dereferencing, pointer-arithmetic etc... the various manifestations
> > of 1st-class pointers
> 
> This is the part that matters.
> 
> > And the third ⅓ is to provide explanations to people asking authentic questions
> > [like the OP of this thread]
> 
> Only questions that actually relate to one of the previous parts.

[dangling pointer ?¿?¿ ]

> 
> > Sure you can say with Steven that this can be 'explained' by saying an object
> > can be in two places at one time.
> > Others would then say 'Humpty-dumpty!' since you have removed the most basic
> > intuition of objects and you are in effect saying that a python object
> > means what you ordain it means without further ado/explanation
> >
> > Since you believe a reference-less dictionary can be a model for such explanations,
> > why not provide that?
> 
> A piece of paper works just fine. However, it's hard to use that
> method of explanation in an email.

I am ready to bet that if ASCII is insufficient then you are drawing pictures

You can call them whatever you like
- pointers, references
- data structure diagrams
- graphs vertices, edges
- I think I'll call them Antoon-art in honor of Antoon Pardon who has the 
  patience to draw them

I believe it was Marko Rauhamaa who have another half dozen metaphors:
- doggies and pussies er.. sorry leashes

Whatever you use, you will have to reify in your explanation the idea of
pointer/graph-edge/etc even and especially because, the language disallows such
a reification



More information about the Python-list mailing list