From: Keats <ke...@su...> - 2003-07-31 04:18:20
|
Brian Goetz wrote: > > Alternately, the internal implementation of putFunction could, instead > of putting it in the _funcs map, actually put it in the context, and let > the context be smarter about invoking functions. I liked this idea too. I was actually trying to get something like this working this afternoon but it was more than I could bite off in an hour. We'd need to change the parser/builder to put a string into the variable name instead of a FunctionCall. I'd need your help there Brian. One small downside is that functions and variables would be in the same namespace, so $foo would overwrite $foo() and vice versa. Not a big deal. On the other hand you could pass functions around as variables, just like "delegates" in C#. Probably a very bad idea, but I'm sure folks could think up some clever template hacks using this. Anyway, I think I could make this work with some help if folks think it's worthwhile. Keats |