[Zope] can't find that thread that justifies a '-' in variabl e names

Jeffrey Shell Jeffrey@digicool.com
Thu, 16 Sep 1999 13:51:55 -0400


> I'm gonna do a demo/class on Zope for my team at work next week.  My
> dtml is so full of _['sequence-item'] that I think I am bound to be
> asked about it.

DTML was designed more as a reporting 'language' initially.  In the old
days of Bobo when there was significantly less through-the-web editing,
putting code in DTML in the form of expressions was not done.  DTML was
a way of making a "view" of an object and seperating code from
presentation.  A very powerful part of all this was (and still is) the
batch processing features of the dtml-in tag, which included all sorts
of features for dealing with batches as well as other sorts of reporting
on a sequence of objects (totals, medians, etc).  Since there was no
worry about having to access these special variables (sequence-item,
sequence-number, previous-batch-start-var-whatever), it was a non issue.
The variables being named this way were probably easier to read and
easier to type (meaning Jim didn't have to go through the agony of using
his shift key too much :) than using an underscore -- especially some of
the really long names that can come out of the batch stuff (a really
really cool feature I encourage people to learn more about.  It seems
woefully neglected.  It's a feature you don't get as easily in the
script/html hybrids of ASP and PHP).

As Principia started to grow up and more and more work was done through
the web into what we now know as DTML Methods, the need to "script"
became increasingly apparent.  Thus, DTML Scripting (via Expr's) was
born.  It was obvious that these special names would be a problem, hence
the introduction of the namespace now known as _.  (In the early
revisions of the Expr machinery it was known as _vars).

At least, that's how I remember it.  There's a fair amount of baggage we
still carry around from the old Bobo days -- but be grateful.  If Bobo
wasn't so great to begin with, Zope wouldn't be nearly as cool as it is
:).