[C++-sig] Re: The "return always existing pointer throws dangling error" problem

David Abrahams dave at boost-consulting.com
Wed Oct 22 03:37:31 CEST 2003

"Niall Douglas" <s_sourceforge at nedprod.com> writes:

> On 21 Oct 2003 at 19:15, David Abrahams wrote:
>> > So you're saying that the _class.def() part has absolutely zero
>> > relation to the call_method part? They are two bits of absolutely
>> > unrelated code?
>> No, they have many relationships.  I'm not sure which kind of
>> relationship you have in mind, though.
> I'm just surprised, that's all. 

I haven't confirmed your thought about "zero relationship", so what is
there to be surprised about?  I don't know what you mean, and you
don't know what Boost.Python is doing AFAICT.

> I personally wouldn't have done it the way you did, that's all. 

How do you know what I did?

> I had imagined that in the situation of C++ calling Python calling
> C++, some form of metadata would need to accompany the data obtained
> from C++ so you know you can throw away its temporarily constructed
> container as the data reenters the C++ world. 

<sigh> Specifics and precision, please.  Guessing what you mean when
you say things like "the data obtained from C++" in a context where
data flows through the Python/C++ boundary twice in each direction is
interesting, but not very productive.

> Maybe, in fact, this is still what is needed.

Hard to say until we know what your problem is.

>> I should've said "minimal but complete".
> I, like you, tend to assume the other person can infer the detail 
> from cursory explanations we post as it's more efficient that way. 

It's more efficient for you and less efficient for me.  Since it's my
volunteer time, I'm asking you to do the work to make sure I don't
waste a lot of time trying to figure out what you need and going down
blind alleys.

> However, you and I clearly don't think similarly - we view solutions
> in completely different fashions which are quite incompatible. I
> daresay that if we were working in a team, either we'd complement
> each other superbly or really really badly. It would be either
> extreme. Very interesting, and very uncommon - most people who don't
> understand me are technically inferior, whereas you most certainly
> are not.

Especially in a two-language (C++/Python) world, there is so much
room for ambiguity that it can be very difficult to communicate.  I
request that you make an extra effort to give me everything I need to
help you and avoid misinterpretation.

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list