On 8/10/2010 3:52 PM, Thomas Heller wrote:
> On Tue, Aug 10, 2010 at 8:56 PM, Eric Niebler wrote:
>> Good. Now if you are saying that Proto's existing transforms are 
>> too low-level and that things like pre- and post-order traversals 
>> should be first class Proto citizens ... no argument. Patch? :-)
> 
> I think i am a little bit responsible for that whole discussion as i
>  mentiones on IRC that proto transforms are hard for me.

The #boost IRC channel? Perhaps I should spend time there.

> So, why are they so hard. I am currently learning the principles of 
> compiler construction (lecture at university). We learn all those 
> fancy algorithms to optimize the hell out of our codes. But these 
> algorithm all rely on bottom-up, top-down and what-not traversals of 
> your AST. proto transforms work a little bit different from these 
> tree traversals. BUT they are very similiar, and probably as you 
> said, a little more low level. Just my 2 cents ;)

And a good 2 cents. I never actually took a compiler construction class.
Oops! But as I showed earlier in this thread, pre-order traversal can be
expressed in terms of fold. Post-order is much the same. But if I'm
going to go around claiming Proto is a compiler-construction toolkit, it
should have the algorithms that people would expect, not the ones I just
made up. :-P

And if you think Proto's transforms are hard now, be glad you weren't
using Proto v2 in 2006. <shudder>

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com
_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto

Reply via email to