anything like C++ references?

Donn Cave donn at u.washington.edu
Wed Jul 16 15:12:19 EDT 2003


In article <20030716123907246-0600 at news.xmission.com>,
 Adam Ruth <owski at hotmail.com> wrote:
> In <donn-6E63A0.10284316072003 at nntp1.u.washington.edu> Donn Cave  wrote:
> > In article <20030716081156943-0600 at news.xmission.com>,
> >  Adam Ruth <owski at hotmail.com> wrote:
> > 
> >> In <1058328099.572993 at yasure> Donn Cave wrote:
> >> > Quoth Adam Ruth <owski at hotmail.com>:
> >> > ....
> >> >| In Python, there is no situation where "you really can't avoid 
> >> >| pointers".  
> >> > 
> >> > That's trivially true, no such situation can exist because that
> >> > Python can't be coded.  I'll repeat an example that I proposed
> >> > a couple days ago, though:  user implemented sequences could be
> >> > implemented with a single simple indexing function, returning
> >> > a pointer/target/whatever;  Python could assign directly to that,
> >> > making "seq[i] = x" the same kind of operation as and automatically
> >> > symmetrical with "x = seq[i]".
 
...
> You are correct, 'really need' is not much of an argument.  The 
> statement I disagreed with was that it was bad to simulate pointers in 
> those situations where "you really can't avoid pointers".  I was 
> expressing that really aren't any such situations, and that it's even 
> worse try to simulate pointers when it's not really necessary.

OK, there really aren't any situations where you can't avoid
pointers ... so you're ready with a solution to the problem
I posed above?

Class scope containers that hold exactly one item, to pick a
commonly seen usage that I suppose is a simulated pointer -
that's really not necessary, and it's "even worse" (than what?)

   Donn Cave, donn at u.washington.edu




More information about the Python-list mailing list