Re: [proto] Recursive functions in a mini language

2010-08-09 Thread Eric Niebler
On 8/9/2010 5:39 PM, Manjunath Kudlur wrote: >> Actually, I think your users will be forced to do: (module->*func)(...) >> because of the precedence. That's pretty ugly. But I see where you're >> going. Your scheme could be made to work as you describe, I think. > > Yes, you are right, I had forgo

Re: [proto] Recursive functions in a mini language

2010-08-09 Thread Manjunath Kudlur
> Actually, I think your users will be forced to do: (module->*func)(...) > because of the precedence. That's pretty ugly. But I see where you're > going. Your scheme could be made to work as you describe, I think. Yes, you are right, I had forgotten about the precedence. > I'm left wondering why

Re: [proto] Recursive functions in a mini language

2010-08-09 Thread Eric Niebler
(Sorry for the delay. It was a crazy weekend.) On 8/6/2010 8:21 PM, Manjunath Kudlur wrote: > Eric Niebler wrote: >> Let me understand. Your goal is to have something like spirit subrules, >> except the subrules are like ordinary functions, and the functions >> should be invokable by name, is that

Re: [proto] Recursive functions in a mini language

2010-08-06 Thread Manjunath Kudlur
> Careful here. You want BOOST_PROTO_AUTO, or else put these things in a > domain defined such that intermediate expressions are not held by > reference. Or else, make declare_module an instance of a type with an > overloaded operator[] that deep-copies it's rhs to avoid all lifetime > issues. Prot

Re: [proto] Recursive functions in a mini language

2010-08-06 Thread Eric Niebler
On 8/6/2010 7:29 PM, Manjunath Kudlur wrote: > I had asked boost-users for suggestions on how to define mutually > recursive functions in a DSEL. Here is the original thread. > http://lists.boost.org/boost-users/2010/07/60488.php > > I am thinking about a solution inspired by Spirit subrules, that