From: Brian G. <br...@qu...> - 2003-04-20 19:11:47
|
> ...so maybe we would have to add the caveat "If you don't know what C > #define is... considering using #include" :-) I'm not so sure that is true. > Thing is I'm a programmer, and I still got bitten by it. Perhaps > because I am a programmer too :) I think it is definitely _because_ you are a programmer. You saw something that admitted recursion and you immediately thought "cool, tree traversal." Designers will see #macro and say "cool, style sheets." > WebMacro must be able to do it (it can, using #include), and preferably > easily (without #include). Without this, you either have to: You can do it with #include, but that wasn't really what #include was designed for either. > Recursion-aware template inlining (AKA #include as template where > script comes from an inline block) still looks like the most > attractive option to me. As far as I know, you're the first person to try and apply WM to this problem. Not that its not a good idea -- but just don't be surprised that WM wasn't built to do that (yet). I think that dealing with tree structured data is just outside the limits of the current WM model, which is why its giving you so much grief. You found a few back-door ways of dealing with the problem, but none that were designed for it. If the community thinks this is a good idea, we can explore it. But my gut feeling is that these "steps forward" have a significant risk of introducing more problems than they solve. I don't want to reinvent XSL with WM syntax. > You're probably right there. However I think to many people recursion is > natural. If you don't really understand what it means to recurse, you don't > see why there could be problems doing it, and it seems rather simple :) I think you must spend too much time with programmers. Recursion confuses just about everyone the first ten times they see it. Its just that programmers had that beaten out of them when then were much younger. |