Re: Re: syntax suggestion

Daniel Wallin <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
David Abrahams wrote:
> Daniel Wallin <[email protected]> writes:
> 
> 
>>David Abrahams wrote:
>>
>>Yeah, it mirrors both the python and luabind syntax. But I really
>>dislike dropping older compilers. 
> 
> 
> I'm beginning to like the idea of dropping them.

I can accept dropping VC6, because it's so damn hard to work around it's
bugs. But this would mean dropping VC7 as well, which is a reasonably
new compiler still in use by many. I don't know how older versions of
other compilers handle function types..

>>Maybe supporting both ala Boost.Function?
> 
> 
> There's always:
> 
>     class_<C (*)(A,B)>("C")
> 
> for the others, if we can afford not to  have C deduced at the outer
> level w/o partial specialization.

Yeah, we can afford that.

>>>The only advantage I can see to using the []s is that it becomes a
>>>bit cleaner to define nested classes.
>>
>>FWIW, this is what it this currently looks like in luabind:
>>
>>    module(L)
>>    [
>>        class_<X>("X")
>>            .static_
>>            [
>>                class_<Y>("Y")
>>                   ...
>>            ]
>>    ];
> 
> 
> Nit: what is .static_ supposed to mean?  Maybe .scope[ ... ] would be
> better?

Yeah, it probably would. It was static_ because it was introduced so
that static functions could be registered. I guess you could read it as
"static_scope", but that's not really a good argument. ;)

-- 
Daniel Wallin


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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.