[Zope] Comment on comments in DTML

Tommy Johnson tommy@7x.com
Wed, 25 Jul 2001 08:44:24 -0800


Tom,

I do have to agree that I don't like the <dtml-comment> tag. I've worked
with all the languages you have plus ColdFusion, and I tend to prefer the
simpler syntax for comments. ColdFusion uses the HTML comment plus one more
dash : <!--- comment --->

All these languages made it easy to comment at the end of a line, but I
usually like to comment in blocks (or a single line right before a small bit
of code). With the dtml comments, it's hard to distinguish a single comment
line from regular code. And writing a comment block seems weird. I usually
line up the opening and closing tags, and indent eight spaces for the
comments. But like I said, it simply looks weird.

For now, I have taken it as a trade-off for the ability to design web
applications in an object oriented fashion. But I'm not sure how much longer
I can stand it ;->

Tommy

Innovation:
The Best Way To Predict The Future ...
     Is To Create It.

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tom
> Cameron
> Sent: Wednesday, July 25, 2001 12:52 AM
> To: zope@zope.org
> Subject: [Zope] Comment on comments in DTML
>
>
> This is not really a question, but a comment about comments :)
>
> I find the <dtml-comment></dtml-comment> syntax for commenting code very
> cludgy and not conducive to well commented code.
>
> I have used Perl, Python, ASP, Java, JavaScript and VB before.
> All of these
> languages have a very simple comment method that allows the coder
> to easily
> place comments at the end of lines or in simple blocks. The Zope
> DTML method
> too cumbersome for simple comments at the end of lines, and even blocks of
> comments don't stand out too well.
>
> I like to comment my code very much and wonder what other people think. I
> understand that being HTML based the comment syntax may have to be an
> inclusive tag, but perhaps a simple one would do.
> I don't know much about the DTML interpreter so I may be off the
> mark here,
> but some suggestions:
>
> </ a comment />
>
> <!--#
> multi
> line
> comment
> -->
>
> <#>comment</#>
>
> <!--#>comment<!--/#>
>
> Acutally the second example almost works now, it stops DTML from
> executing,
> but it then renders the code and the comment. The appropriate
> thing would be
> to not render the comment at all.
>
> Well there could be many good ways, I just think the more we encourage
> people to comment their code the better all code will be.
>
> Tom
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )