[ic] ITL functions
db at kavod.com
Thu Sep 15 23:36:36 EDT 2005
* jeff at hisgirlfridays.com <jeff at hisgirlfridays.com> [2005-09-15 17:39]:
> I am just finishing up an experimental project of sorts. To complete my latest IC
> project, I determined that I was not going to use any of Foundation, and furthermore, I
> was going to use ITL as much as possible.
> As the project comes to a close, I'd say it worked damn well, with the exception of one
> thing. I don't know how to do a function that contains ITL. For example, I found
> that I cut-and-pasted large blocks of ITL in numerous places. Now I should refactor those
> blocks into function calls, but usertags consist of perl, not ITL. I might be able to
> make a generic usertag wrapper that called functions via include or some other kludgy
> mechanism, but before I go off on a ridiculous tangent I was curious as to how some of the
> experts here might address this.
I think that it would be very nice to have a simple, elegant argument
passing scheme for ITL. It would be useful even for short, simple
ITL snippets that aren't ready to become perl code yet. Something like a
Throwing out some ideas...
[call-itl fn=foo a=1 b=2]
* Sets up special environment variables, accessible via [arg a], [arg b]
(or scratch vars if we don't want to start a new namespace.)
* Does an [include] itl_lib/<function>.itl (foo.itl in this case) (with
interpolation of argument variables as above) -- or maybe an
It would probably be difficult to get the order of interpolation just right.
Daniel Browning <db at kavod.com> - Kavod Technologies. Random Fortune:
Any time things appear to be going better, you have overlooked something.
More information about the interchange-users