Lalo Martins wrote
dtml-let solves a problem: it's a much nicer way to spell _.namespace()
You answer yourself.
Hm, I should have made it clear that the post I made wasn't necessarily advocating one thing over another, but was more pointing out some things that I see as issues.
dtml-local is IMHO wrong. But dtml-set should be added, it fits naturally. Or, in your words, is a much nicer way to spell REQUEST.set.
Is it? Not according to Phillip's original post - set is for changing values in the current local namespace. REQUEST.set is a different thing altogether. It doesn't worry me that REQUEST.set has to be spelled out explicitly, as this highlights quite clearly what's going on... (Aside: It seems to me that one of the more common uses of REQUEST.set that I've seen is as a sort-of global namespace that's useful for stuffing temporary values into. It's the reason I did the session code - (ab)using REQUEST in this way seemed bad. Ok, so the sessions also suffer from this a bit, but they're a nice fit for so many problems.) local/set seem like they need to both be in, or neither. Allowing set to modify any namespace strikes me as dangerous. Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
participants (1)
-
Anthony Baxter