[Zope-dev] Speaking of 2.6...

Brian Lloyd brian@zope.com
Wed, 17 Apr 2002 10:57:27 -0400


> <dtml-let> is like defining a local variable in python.
> REQUEST.set is like a global variable, but in Zope terms it only 
> lasts marginally longer.
> SESSION.set is also global, but lasts even longer
> 
> I find I want to legitimately store a lot of stuff that belongs 
> in the second case where
> REQUEST is the perfect vehicle, why is making this smell a little 
> nicer a bad thing?

>From the Zen of Python: "Explicit is better than implicit".

We've been trying hard to adopt this bit of Zen. If you write 
REQUEST.set, you can look at it and easily see what is happening. 
Same with SESSION.set. 

If you're looking at <dtml-set...> as a newbie to Zope, your 
first thought is probably "where exactly is this being set?". 
Who decided that REQUEST was a better place to implicitly set 
the variable? Why not the SESSION?

We are trying to get *away* from the impression that everything 
in Zope is too implicit and magical :) It's funny to see things 
run full circle, as now some of the people who have beaten us
up the most about too much magic are arguing for brand new and 
improved magic! :^)


Brian Lloyd        brian@zope.com
V.P. Engineering   540.361.1716       
Zope Corporation   http://www.zope.com