[Zope] The new DTML syntax

Alexander Staubo alex@mop.no
Fri, 6 Aug 1999 17:22:53 +0200


The discussion could not have happened a month ago because nobody had
spent any serious amount of time with the syntax. Time is not an issue
here, or at least it shouldn't be. We're talking about a feature of Zope
that, once established, we'll be living with for ever after.

Besides, migration problems isn't the issue. I don't see the difficulty.
There's no particular reason why Zope shouldn't be able to apply the
changes automatically, for example.

My contention is that the new syntax is significantly less readable and
far too verbose. It's not really about keystrokes (the new syntax three
characters shorter than the SSI syntax). The new syntax detracts from
the idea of DTML as an expressive language -- why, if I had to prefix
every word I spoke with the word "dtml", that wouldn't be so great.
Because dtml-eventually dtml-you'd dtml-have dtml-to dtml-learn dtml-to
dtml-filter dtml-out dtml-the dtml-dummy dtml-words. But in the world of
natural languages, "dtml-if" isn't a word; it's two words; we learn, by
convention, to split such hyphenated constructs into separate words. Our
mind works best with individual words. Why go against the grain and
teach the brain a new thing?

Afaik, there's no technical reason to prefer the "dtml-" prefix to
something like "z-" or "dt". Is "dtml-in" somehow more unique in the
world of markup languages than "dtin"? In the future when we're using
XML namespaces, will we be writing "dtml:dtml-in"?

I'm not surprised that DC dominates the negatively-charged end of the
discussion, but this is supposed to be an open-source development
project, so I suggest a good, clean discussion on the topic and then a
vote.

-- 
Alexander Staubo             http://www.mop.no/~alex/
"Elvis skipped around the car and threw open the trunk.
'Hoopla!' he was heard to say, 'This is a 7.62mm M134 General
Electric Minigun. Up to 6,000 rounds per minute. 7.62mm X 51 shells.
1.36kg recoil adaptors. Six muzzle velocity of 869m/s.'
'Oh,' said Rex, 'So that's what it is.'"
--Robert Rankin, _They Came And Ate Us: Armageddon 2: The B-Movie_

>-----Original Message-----
>From: Christopher Petrilli [mailto:petrilli@digicool.com]
>Sent: 6. august 1999 00:48
>To: Paul Prescod; zope@zope.org
>Subject: Re: [Zope] The new DTML syntax
>
>
>> Tim Wilson wrote:
>>> 
>>> On Thu, 5 Aug 1999, Martijn Faassen wrote:
>>> 
>>> > I'd vote for 'z-if' as opposed to 'zif', though, as I'd read
>>> > 'zzzzzzzzzzzzif!' for the latter, and not 'zed-if'. Also 
>the '-' helps
>>> > distinguishing DTML visually from HTML.
>>>
>>> I wholeheartedly agree. The z-foo syntax is very clean and 
>intuitive.
>>
>> The XML convention is z:if. You can take that as an argument for or
>> against the hyphen as you see fit.
>
>Or perhaps in this case not even necessary.  Our plans for XML are MUCH
>bigger than just a tacked on syntax, and XMLDocument is just 
>the beginning
>of what you'll see in the coming months.  We specifically 
>avoided using an
>XML namespace syntax.
>
>As for whether it will change, I SERIOUSLY doubt it, as:
>
>    * It's already been adopted by internal projects
>    * It's been adopted by OTHER projects
>    * Documentation is being updated to reflect this
>
>There's no huge gain to go to <z-foo> rather than <dtml-foo> 
>other than a
>few saved characters.  The larger gain was moving away from SSI syntax,
>because this has allowed us to teach the syntax to editors 
>like Alpha and
>GoLive.
>
>This discussion should have happened a month ago before we 
>committed the new
>syntax out of "experimental" stage, but it is no longer experimental.
>
>As for new renderers, well, *personally* I think there are too 
>many syntaxes
>as it is:
>
>    <!--#var foo-->
>    <dtml-var foo-->
>    %(foo)s   or some such :-)
>
>Over the long term, I suspect that the SSI syntax will be 
>deprecated, but
>not until we can provide a good program to convert everything 
>to the new
>syntax.
>
>Chris
>--
>| Christopher Petrilli        Python Powered        Digital 
>Creations, Inc.
>| petrilli@digicool.com                             
http://www.digicool.com

_______________________________________________
Zope maillist  -  Zope@zope.org
http://www.zope.org/mailman/listinfo/zope

(To receive general Zope announcements, see:
http://www.zope.org/mailman/listinfo/zope-announce

For developer-specific issues, zope-dev@zope.org -
http://www.zope.org/mailman/listinfo/zope-dev )