RE: [Zope] The new DTML syntax
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 )
At 17:22 06/08/99 , Alexander Staubo wrote:
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.
I have been using the new syntax for quite a while now. I have absolutely no problem in filtering out the dtml- prefix, just like I won't have any problems filtering out the z- prefix, or any other, _provided_ the prefix ends in a hyphen! It would be much harder to filter out the prefix without that clear delimiter. And no prefix would remove the possibility of defining our own dtml tags arbitrarily, like <dtml-html>, or to recognize custom dtml-tags in code not written by yourself. And believe me, I look at a lot of code written by others. I vote for a syntax where there is a prefix with a hyphen. Be it z- or dtml-, it doesn't matter that much to me in typing effort. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
In article <4.2.0.58.19990806174546.00dafeb0@lisp.atmm.nl>, Martijn Pieters <mj@antraciet.nl> writes
I have been using the new syntax for quite a while now. I have absolutely no problem in filtering out the dtml- prefix, just like I won't have any problems filtering out the z- prefix, or any other, _provided_ the prefix ends in a hyphen! It would be much harder to filter out the prefix without that clear delimiter.
And no prefix would remove the possibility of defining our own dtml tags arbitrarily, like <dtml-html>, or to recognize custom dtml-tags in code not written by yourself. And believe me, I look at a lot of code written by others.
I vote for a syntax where there is a prefix with a hyphen. Be it z- or dtml-, it doesn't matter that much to me in typing effort. at least make it a lower case delimiter on my kbd - is lower, but : is upper. -- Robin Becker
In article <B059671903C6D211A0D500C0F0301C79161B03@kubrick.mop.no>, Alexander Staubo <alex@mop.no> writes
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. forever <= 1 month in zopeland
Besides, migration problems isn't the issue. I don't see the difficulty. ... other good stuff -- Robin Becker
Alexander Staubo wrote:
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.
The new DTML syntax was announced June 15. I think that one month ago, there was ample time to try out the new syntax. At this point, quite a few people are using the new syntax. Further, since we are now in the beta release cycle, we would not be justified in removing this feature. So, if we wanted to support a new spelling, we'd have to support it in addition to the SSI and '<dtml-' varieties. This isn't very appealing.
Besides, migration problems isn't the issue. I don't see the difficulty.
I see a big problem. Lot's of people have code using the dtml-xxx spelling.
There's no particular reason why Zope shouldn't be able to apply the changes automatically, for example.
Zope then has to support three variants. This is really unappealing from a documentation and support point of view.
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?
I don't agree with your assertion that the new syntax is less readable than the SSI syntax. I had lots of positive feedback when I proposed the new syntax. While a number of people have expressed a preference for z-if over dtml-if, I haven't seen many people express a preference for SSI. I happen to like the two-word reading of dtml-xxx. You get to reuse an existing vocablary, including words like 'if' and 'in' and add a descriptive word, 'dtml' to provide context. This is why I switched to using a hyphen (as suggested very early on by Jeffrey Shell) rather than an underscore, which is what I first used.
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 don't think that there is an overwhelming technical reason to prefer 'dtml-x' over 'z-x'. OTOH, I don;t think there is an overwhelming reason to pefer z-x either. I think that 'dtml-var' is much better than 'dtvar' from a readability point of view.
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.
I once asked on the Python list what constituted "flaming". Tim Peters gave, what I thought was a very sound definition. He said that you could spot flaming by looking for meta-discussions, discussions about discussions, as a sign of flaming. I think that the best way to have a good clean discussion is to stay focussed on the practical merits (technical and non-technical) of proposals and ideas. Finally, I'll point out that the coming XML variant of DTML will make this discussion moot, at least if you use the XML variant. With XML namespaces, you will be able to use whatever prefix you want, since the prefix is just a local alias for a unique name. So you can use 'z:if', someone else can use 'dtml:if', and I can use 'jim:if'. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
On Mon, 9 Aug 1999, Jim Fulton wrote:
Zope then has to support three variants. This is really unappealing from a documentation and support point of view.
Before the XML stuff comes out I'd like to propose a solution to the documentation problem. My proposition is to create a super-zclass called __builtin__. This ghost-class implements all the built-in tags AND documents them. This could be done by slurping out the doc strings for each tag (assuming each tag is implemented via a class). Hence, the HELP tab in the management screen would always display the most-to-date information on all these wonderful tags. Also, it could describe each of the 1 million forms of dtml syntax. To take it further, why not create a tagmethod which includes a documentation property (see my last big post for the tagmethod concept). Cheers, Anthony Pfrunder
participants (5)
-
Alexander Staubo -
Anthony Pfrunder -
Jim Fulton -
Martijn Pieters -
Robin Becker