Re: [proto] Visitor Design Pattern

2010-10-26 Thread joel falcou
On 26/10/10 19:44, Eric Niebler wrote: struct my_actions_with_state { // specializations to look up transforms // using rules: templatetypename Rule struct when; // any ol' state can go here: int my_state; }; Now, you can pass an instance of my_actions_with_state

Re: [proto] Visitor Design Pattern

2010-10-25 Thread Joel de Guzman
On 10/25/10 7:44 PM, Thomas Heller wrote: On Mon, Oct 25, 2010 at 11:57 AM, Joel de Guzman j...@boost-consulting.com wrote: On 10/25/2010 12:39 PM, Eric Niebler wrote: On 10/24/2010 8:32 PM, Joel de Guzman wrote: On 10/25/2010 8:49 AM, Eric Niebler wrote: Like visitor, actor comes with

Re: [proto] Visitor Design Pattern

2010-10-25 Thread Eric Niebler
On 10/25/2010 4:44 AM, Thomas Heller wrote: Thank you very much! So, we are good to changing the internals of phoenix3 to use this extension mechanism? Yes. But today I'm going to made some changes, based on my experience playing with this code last night. In particular, it should be possible

Re: [proto] Visitor Design Pattern

2010-10-25 Thread Eric Niebler
On 10/25/2010 4:44 PM, Joel de Guzman wrote: On 10/26/2010 4:30 AM, Eric Niebler wrote: [...] Voila! The implementation is trivial: one specialization of proto::when on the new (incomplete) proto::external type. God, why didn't I think of this sooner? The naming issue goes away

Re: [proto] Visitor Design Pattern

2010-10-25 Thread Joel . Falcou
You could pass it as state OK or bundle it with the external transforms. All you need is a nested when template. Does that help? A short example of this for my poor 7am self without coffee ;) ? ___ proto mailing list proto@lists.boost.org

Re: [proto] Visitor Design Pattern

2010-10-24 Thread Thomas Heller
On Sun, Oct 24, 2010 at 9:59 AM, Joel de Guzman j...@boost-consulting.com wrote: On 10/24/2010 1:16 PM, Eric Niebler wrote: Now, what to call the traveral/algorithm/action/on thingy. None of those feel right. Maybe if I describe in words what it does, someone can come up with a good name.

Re: [proto] Visitor Design Pattern

2010-10-24 Thread Joel de Guzman
On 10/24/2010 5:10 PM, Thomas Heller wrote: On Sun, Oct 24, 2010 at 9:59 AM, Joel de Guzman j...@boost-consulting.com wrote: On 10/24/2010 1:16 PM, Eric Niebler wrote: Now, what to call the traveral/algorithm/action/on thingy. None of those feel right. Maybe if I describe in words what it

Re: [proto] Visitor Design Pattern

2010-10-24 Thread joel falcou
On 24/10/10 11:53, Joel de Guzman wrote: Am I the only one thinking that actor should be more a part of proto than phoenix? I'd love to use such a generic extension mechanism for Spirit too, for example. I *need* it for nt2 too, makes some optimisation far simpler than before.

Re: [proto] Visitor Design Pattern

2010-10-23 Thread Thomas Heller
@lists.boost.org Reply-To: Discussions about Boost.Proto and DSEL design proto@lists.boost.org Subject: Re: [proto] Visitor Design Pattern On 10/23/2010 5:36 AM, Eric Niebler wrote: On 10/22/2010 10:45 AM, Eric Niebler wrote: On 10/22/2010 10:01 AM, Thomas Heller wrote: I think

Re: [proto] Visitor Design Pattern

2010-10-23 Thread Eric Niebler
On 10/23/2010 10:45 AM, Thomas Heller wrote: On Saturday 23 October 2010 19:30:18 Eric Niebler wrote: On 10/23/2010 10:12 AM, Eric Niebler wrote: I've tweaked both the traversal example you sent around as well as my over toy Phoenix. Tell me what you guys think. Actually, I think it's better

Re: [proto] Visitor Design Pattern

2010-10-23 Thread Eric Niebler
On 10/23/2010 5:10 PM, Joel de Guzman wrote: On 10/24/2010 2:18 AM, Thomas Heller wrote: On Saturday 23 October 2010 19:47:59 Eric Niebler wrote: On 10/23/2010 10:45 AM, Thomas Heller wrote: Why not just rule? Less characters to type. I almost called it rule, but *everything* in Proto is a

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Eric Niebler
On 10/21/2010 7:09 PM, Joel de Guzman wrote: Check out the doc I sent (Annex A). It's really, to my mind, generic languages -- abstraction of rules and templated grammars through metanotions and hyper-rules. Parameterized rules. Yes, I can understand that much. My understanding stops when I

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Eric Niebler
On 10/22/2010 12:33 AM, Thomas Heller wrote: On Friday 22 October 2010 09:15:47 Eric Niebler wrote: On 10/21/2010 7:09 PM, Joel de Guzman wrote: Check out the doc I sent (Annex A). It's really, to my mind, generic languages -- abstraction of rules and templated grammars through metanotions

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Thomas Heller
On Friday 22 October 2010 09:58:25 Eric Niebler wrote: On 10/22/2010 12:33 AM, Thomas Heller wrote: On Friday 22 October 2010 09:15:47 Eric Niebler wrote: On 10/21/2010 7:09 PM, Joel de Guzman wrote: Check out the doc I sent (Annex A). It's really, to my mind, generic languages --

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Joel de Guzman
On 10/22/10 3:15 PM, Eric Niebler wrote: On 10/21/2010 7:09 PM, Joel de Guzman wrote: Check out the doc I sent (Annex A). It's really, to my mind, generic languages -- abstraction of rules and templated grammars through metanotions and hyper-rules. Parameterized rules. Yes, I can understand

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Joel de Guzman
On 10/22/10 4:17 PM, Thomas Heller wrote: On Friday 22 October 2010 09:58:25 Eric Niebler wrote: On 10/22/2010 12:33 AM, Thomas Heller wrote: On Friday 22 October 2010 09:15:47 Eric Niebler wrote: On 10/21/2010 7:09 PM, Joel de Guzman wrote: Check out the doc I sent (Annex A). It's really,

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Thomas Heller
On Friday 22 October 2010 11:29:07 Joel de Guzman wrote: On 10/22/10 4:17 PM, Thomas Heller wrote: On Friday 22 October 2010 09:58:25 Eric Niebler wrote: On 10/22/2010 12:33 AM, Thomas Heller wrote: On Friday 22 October 2010 09:15:47 Eric Niebler wrote: On 10/21/2010 7:09 PM, Joel de

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Thomas Heller
On Friday 22 October 2010 11:29:07 Joel de Guzman wrote: On 10/22/10 4:17 PM, Thomas Heller wrote: On Friday 22 October 2010 09:58:25 Eric Niebler wrote: On 10/22/2010 12:33 AM, Thomas Heller wrote: On Friday 22 October 2010 09:15:47 Eric Niebler wrote: On 10/21/2010 7:09 PM, Joel de

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Eric Niebler
On 10/22/2010 10:01 AM, Thomas Heller wrote: I think this is the simplification of client proto code we searched for. It probably needs some minor polishment though. snip Hi Thomas, this looks promising. I'm digging into this now. -- Eric Niebler BoostPro Computing http://www.boostpro.com

Re: [proto] Visitor Design Pattern

2010-10-22 Thread Joel de Guzman
On 10/23/10 7:44 AM, Hartmut Kaiser wrote: On Friday 22 October 2010 11:29:07 Joel de Guzman wrote: On 10/22/10 4:17 PM, Thomas Heller wrote: On Friday 22 October 2010 09:58:25 Eric Niebler wrote: On 10/22/2010 12:33 AM, Thomas Heller wrote: On Friday 22 October 2010 09:15:47 Eric Niebler

Re: [proto] Visitor Design Pattern

2010-10-22 Thread eric
-consulting.com Sender: proto-boun...@lists.boost.org Date: Sat, 23 Oct 2010 09:29:27 To: proto@lists.boost.org Reply-To: Discussions about Boost.Proto and DSEL design proto@lists.boost.org Subject: Re: [proto] Visitor Design Pattern On 10/23/2010 5:36 AM, Eric Niebler wrote: On 10/22/2010 10:45

Re: [proto] Visitor Design Pattern

2010-10-21 Thread Eric Niebler
On 10/21/2010 6:41 PM, Joel de Guzman wrote: I like it when we are talking on a conceptual level :-). I think part of the difficulty is in combining two domains: language/parsing and OOP. nod As much as I do not have any problems with visitation, it's also intersecting with the notion of