Am I the only one who does not take particularly kindly to the new DTML syntax? Well, I guess I might be. :) Before you bring forth the lynching implements, though, hear me out. In my opinion the number one problem is that the word "dtml" detracts from readability (as does the fact that the new syntax is visually less distinguishable from HTML or XML, but I guess that as we're dealing with SGML-like markup languages we can't really avoid that). When I think "if", I want to type "if", not "dtml-if", and consequently I typically end up writing "if", backtracking a bit, typing "dtml-" and then going on from there. That's just me, I guess. But the point is, the inclusion of "dtml-" spins my mind through too many connotations. If I had to type "html-" before every HTML tag, the same thing would happen. It would be a pain. Since control characters (<, >, :, # and so forth) do not carry the baggage of mental associations, they are more efficient, and that's why the old "<!--#" sequence still comes easier to my mind than the new syntax. Another, possibly more powerful argument is that the new syntax is essentially backwards: The actually "command" or "directive" doesn't start until 7 characters into the tag ("<dtml-"). To match one dtml-if against its closing tag, the mind must visually match a whole 7 characters ("dtml-if"), which is awkward. More than that, psychologically a sequence of characters such as "dtml-if" is much less efficient for pattern matching than just the sequence "if", especially if we consider the multitude of DTML keywords: They all share the common prefix "dtml-", making them variations of a spelling rather than separate, mind-sortable entities. The fact that the closing tag slash -- as in "</dtml-if>" precedes the "dtml" part actually _forces_ your brain to process the whole string, as opposed to just honing in on the "if" part. I don't know about you, but my mind sifts through a list such as if in var else unless sqltest call must faster than dtml-if dtml-in dtml-var dtml-else dtml-unless dtml-sqltest dtml-call Imho, Cold Fusion's CFML syntax does one notch better than DTML because it only devotes two characters ("CF") to distinguishing Cold Fusion tags from other markup, so you have keywords such as "cfquery", "cfoutput", and so on. Easily recognizable, short, sweet, easy to type. On the other hand, it uses a proprietary syntax for in-place variable insertion (eg., "#Name#" inserts the variable Name), so it's not all bliss. While I realize this stuff is somewhat subjective, from a technical viewpoint my opinion is that we're not there quite yet. Bring on the pitchforks and torches. :) -- Alexander Staubo http://www.mop.no/~alex/ "It has taken the planet Earth 4.5 billion years to discover it is 4.5 billion years old." --George Wald
On Thu, Aug 05, 1999 at 06:09:48PM +0200, Alexander Staubo wrote:
Am I the only one who does not take particularly kindly to the new DTML syntax? Well, I guess I might be. :) Before you bring forth the lynching implements, though, hear me out.
[snip]
Imho, Cold Fusion's CFML syntax does one notch better than DTML because it only devotes two characters ("CF") to distinguishing Cold Fusion tags from other markup, so you have keywords such as "cfquery", "cfoutput", and so on. Easily recognizable, short, sweet, easy to type. On the other hand, it uses a proprietary syntax for in-place variable insertion (eg., "#Name#" inserts the variable Name), so it's not all bliss.
So you suggest using somethig like "dtif" or "dt-if" ? -Petru
Why not <Z-if>, <Z-var>, etc.? :) At 09:13 PM 8/5/99 +0300, Petru Paler wrote:
On Thu, Aug 05, 1999 at 06:09:48PM +0200, Alexander Staubo wrote:
Am I the only one who does not take particularly kindly to the new DTML syntax? Well, I guess I might be. :) Before you bring forth the lynching implements, though, hear me out.
[snip]
Imho, Cold Fusion's CFML syntax does one notch better than DTML because it only devotes two characters ("CF") to distinguishing Cold Fusion tags from other markup, so you have keywords such as "cfquery", "cfoutput", and so on. Easily recognizable, short, sweet, easy to type. On the other hand, it uses a proprietary syntax for in-place variable insertion (eg., "#Name#" inserts the variable Name), so it's not all bliss.
So you suggest using somethig like "dtif" or "dt-if" ?
In article <19990805211330.A638@bv.ro>, Petru Paler <ppetru@bv.ro> writes
On Thu, Aug 05, 1999 at 06:09:48PM +0200, Alexander Staubo wrote:
Am I the only one who does not take particularly kindly to the new DTML syntax? Well, I guess I might be. :) Before you bring forth the lynching implements, though, hear me out.
[snip]
Imho, Cold Fusion's CFML syntax does one notch better than DTML because it only devotes two characters ("CF") to distinguishing Cold Fusion tags from other markup, so you have keywords such as "cfquery", "cfoutput", and so on. Easily recognizable, short, sweet, easy to type. On the other hand, it uses a proprietary syntax for in-place variable insertion (eg., "#Name#" inserts the variable Name), so it's not all bliss.
So you suggest using somethig like "dtif" or "dt-if" ? how about zif zin zcall zelse etc
-Petru
_______________________________________________ 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 )
-- Robin Becker
<SNIP!>
how about zif zin zcall zelse etc
lol. That has a nice ring to it! ;-) "zin" sounds like a drunk guy trying to say "sin" :-P. One thing I like about Cold Fusion is how easy it is to do an include: <cfinclude template="blue_header_employer.html">
<SNIP!>
how about zif zin zcall zelse etc
lol. That has a nice ring to it! ;-) "zin" sounds like a drunk guy trying to say "sin" :-P. One thing I like about Cold Fusion is how easy it is to do an include:
<cfinclude template="blue_header_employer.html">
Perhaps I'm missing something about CF here, but <dtml-var blue_header_employer> seems...well, simpler? (I suppose CF could be doing some variable substitution behind the scenes) tone.
Hi Gang, Before we go and change the syntax (yet again!) we should implement (or help me find it in the code...) a generic render interface. So, <dtml-if> all feed into a renderer based on render.class <z-if> <xhtml:mytag> This would allow you to add renderers without killing previous ones etc. Also, it would be cool to allow renderers to interact. For example, <xhtml:mytag> would be renderered using XML Doc but the contents could be rendered using DTML. In other words, you can switch between renderers. XML would allow custom tags and DTML would be your fav commands. The other important feature is to have them all at the same precedence level (ie don't parse all of 1 type and then all of the next type) Cheers, Anthony Pfrunder Computer Systems Engineering University of Queensland
participants (7)
-
Alexander Staubo -
Anthony Pfrunder -
Petru Paler -
Phillip J. Eby -
Robin Becker -
Sean Robertson -
Tony.McDonald@newcastle.ac.uk