Re: DSEL syntax, or opening the can of worms.

David Abrahams <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
on Wed Aug 08 2007, John Moeller <fishcorn-AT-gmail.com> wrote:

> Rene Rivera wrote:
>> namespace_(L,"a")
>> [
>>    def("f",&a::f),
>>    class_<a::A>("A")
>>    [
>>      def("do",&a::A::do),
>>      class_<a::A::B>("B")
>>      [
>>        def("again",&a::A::B::again)
>>      ]
>>    ]
>> ]
>> 
>> Which has a one-to-one correspondence with the C++ code. So... Was this 
>> ever considered? If it was, why was it not used? Is there a discussion 
>> in the list I haven't read about this?
>
> I don't think it was ever discussed; 

It was, though it may have been a private thing between me and Daniel.

> I've been over the history at least twice now, and I don't believe
> that the DSEL was discussed to this extent.  I think that only minor
> details were covered.  I could have missed something, though.  There
> isn't any code to cover the frontend either, so it seems that the
> DSEL is open territory for discussion.
>
> Just a peanut gallery comment: I like Rene's proposed syntax
> better. 

But as Daniel points out, there are some practical disadvantages.

> Ostensibly, you should be able just to drop a class into another
> class' scope (though there may be details that would cause some
> difficulty that I haven't thought of).  It's also a lot smoother
> and, to me at least, more expressive.

Yeah, maybe... but this issue (and the one about explicit overload
selection, are really minor details that should have little impact on
the overall plan.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

The Astoria Seminar ==> http://www.astoriaseminar.com


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
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.