Re: new round

Daniel Wallin <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
Alexander Nasonov wrote:

> On Thursday 26 February 2004 13:29, David Abrahams wrote:
> 
>>Alexander Nasonov writes:
>>
>>>The x_module object is a root of information about entities defined
>>>there. They can be introduced like this:
>>>
>>>x_module
>>>[
>>>    def("free_function", free_function),
>>>    class_<X>("X")
>>>    [
>>>        def("member_function", &X::member_function)
>>>    ],
>>>];
>>
>>Sure!
> 
> 
> I decided to minimize compile-time checks to reduce compilation time. For
> example, there is no compile-time check for member_function to belong to X.
> I'll implement it as a runtime function later.

This likely won't work. We need to know the type of the wrapped class
when generating the member function dispatcher.

>>>Retrieving a definition from x_module is simple:
>>>
>>>definition free_function_def =
> 
> x_module.find_definition("free_function");
> 
>>OK...
>>
>>
>>>Although I implemented only class 'definition' I'm going to add
>>>function_def, class_def and so on.
>>
>>You lost me.
> 
> 
> Well, generic 'definition' can call overloaded function properly or it can
> be used to retrieve nested definitions. This comes at runtime cost, though.
> Other possibility might be to find a best function at startup and then call
> the function quickly. To archieve this, specialized classes are required.

I'm kind of lost here. But I think that this is beyond the scope of
langbinding. This looks like boost::python::object or luabind::object.

>>>This code works fine in my test version if free_function is not
>>>overloaded.
>>
>>...for overloading?
> 
> C++ rules are complicated and I don't want to start implementation until
> concepts are clarified. Only simple skeleton at the beginnning.

Have you scanned our discussions on this list? A lot of thought has
already gone into this, and I would hate for you to reinvent the wheel.

Also, a fairly large part of this has been implemented in BPL and
luabind (conversion and policy systems for instance). And I have started
working on implementing the "abstract interface" thing. I expected to
check something in in a few days, when I get a bit of free time from the
luabind release.

Perhaps you could compare what I'll be checking in and what we have
already discussed on the list with your ideas?

-- 
Daniel Wallin


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.