[ZPT] Possible changes to path-related
R. David Murray
bitz@bitdance.com
Tue, 1 May 2001 16:18:55 -0400 (EDT)
On Tue, 1 May 2001, Evan Simpson wrote:
> The only thing I've been able to think of, and I don't really like it,
> is to get wordy:
>
> (use-if-exists)
> (use-if-true)
(use-if-exists-and-true) ?
I actually kind of like these <wry grin>. They seem more expressive of
what's going on.
> I think about these modifier using an analogy to Python. I translate as
> follows (ZPT spelling on the first line, then Python spelling):
>
> tal:action="path:foo"
> action(foo)
>
> tal:action="path:(if) foo"
> if foo:
> action(foo)
>
> tal:action="path:(exists) foo"
> action(exists('foo'))
So 'action' knows not to do anything if exists returns "some special flag",
right?
> tal:action="path:(if exists) foo"
> if exists('foo'):
> action(foo)
Now here is exactly where I think the confusion lies, and if I'm
right this makes a pretty dramatic statement of how confusing it is,
if the inventor got it wrong <grin>. Shouldn't this read:
if exists('foo') and foo:
action(foo)
--RDM