[C++-sig] Re: C arrays solution
David Abrahams
dave at boost-consulting.com
Wed Oct 15 23:10:19 CEST 2003
Niall Douglas wrote:
> On 15 Oct 2003 at 11:38, David Abrahams wrote:
>
>
>>>>>The key here is that MyList knows nothing of python and offers no
>>>>>more than a C array of pointers, something which up until now was
>>>>>hard to wrap without lots of munge code.
>>>>
>>>>I'm not sure what "munge code" means. The behavior you show above
>>>>is almost trivial to achieve using Boost.Python, without anything I
>>>>consider to be "munge code".
>>>
>>>I'm getting that picture from Raoul. However if it's so easy, why is
>>>Raoul developing indexing_suite?
>>
>>To handle reference and lifetime issues which are mostly not relevant
>>to you because your container holds strings, which are immutable in
>>Python.
>
>
> ?!?!?!?
>
> Whatever gave you the idea my container holds strings?
Your examples did. You can't really claim to be shocked, can you?
> That was my
> *test* container and I chose strings because BPL already provides
> conversion to python types.
>
> The real actual world use is for arbitrary bespoke containers
Hmm...
bespoke
Bespoke (pronounced bee-SPOHK) is a term used in the United Kingdom and
elsewhere for an individually- or custom-made product or service.
Traditionally applied to custom-tailored clothing, the term has been
extended to information technology, especially for software consulting
services. Typically, software consulting companies offer packaged
(already invented and generally applicable) software and bespoke
software for client needs that can't be satisfied by packaged software.
In the U.S., bespoke software is often called custom or custom-designed
software
OK.
> returning arbitrary objects sometimes by value and sometimes by
> reference.
OK, then I'd use the suites if I were you.
> I did state that the code I posted was proof of concept many times!
I don't know why you're telling me that, but anyway... I was just trying
to help you get to an easy and reliable solution. If you're interested
in pursuing your own homegrown solution, it's fine by me. I'll be happy
to go back to my other pursuits and stop pointing out that I think
there's a better way.
Regards,
Dave
More information about the Cplusplus-sig
mailing list