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
On Wed, 25 Jul 2001 18:51:47 +1000, "Tom Cameron" <tom@mooball.com> wrote:
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 think one reasonable answer to this is that dtml is not really designed for code. If you have logic expressed in dtml that is non-trivial enough to benefit from commenting, then dtml is probably not the best language to express it in. (all, IMO). Toby Dickenson tdickenson@geminidataloggers.com
Toby, I think that DTML, mostly because of its modular and hierarchical nature, is deceptively simple, but actually quite powerful. It is true that most individual methods or documents are simple in isolation, but within an entire site they represent part of a complex system. I find it is this modular nature that, in fact, drives me to want to comment my code even more. If you are sharing your code or developing in a team, it can be difficult to drill through many separated methods to understand what is happening. I think you can never comment code too much. Thanks, Tim, for your comments, I was not aware that it had been discussed before. Tom. => => I think one reasonable answer to this is that dtml is not really => designed for code. If you have logic expressed in dtml that is => non-trivial enough to benefit from commenting, then dtml is probably => not the best language to express it in. => => (all, IMO). => => => => Toby Dickenson => tdickenson@geminidataloggers.com => => _______________________________________________ => 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 ) =>
RE: [Zope] Comment on comments in DTMLwhat do we need in order to upgrade zope from 2.3.2 to version 2.4? i read somewhere i need to upgrade python to 2.1. what else do i need like do i need other updates in order for me to update python? i seem to be having trouble updating python from 1.5 to 2.1. it's like asking me to upgrade my gcc version because it cannot understand a "-ldz" argument. weird. what is the benefit of upgrading from 2.3.2 to 2.4? i know there are a lot of changes. but is all the updtaes of pythong and zope worth it? i don't have an idea of what to do now. thanks. Fritz Mesedilla Systems Administrator Summit Interactive, Inc. FHM | Seventeen | Candy | Cosmopolitan | Preview | Good Housekeeping femalenetwork.com | candymag.com | fhm.com.ph | cosmo.com.ph Palm Pilot Software: TVSked - Download from the link below ---------------------------------------------------------------------------- http://mesedilla.tripod.com +Basta Ikaw Lord -----Original Message----- From: Tom Cameron [mailto:tom@cameron.to] Sent: Wednesday, July 25, 2001 8:17 PM To: tdickenson@geminidataloggers.com Cc: zope@zope.org Subject: RE: [Zope] Comment on comments in DTML Toby, I think that DTML, mostly because of its modular and hierarchical nature, is deceptively simple, but actually quite powerful. It is true that most individual methods or documents are simple in isolation, but within an entire site they represent part of a complex system. I find it is this modular nature that, in fact, drives me to want to comment my code even more. If you are sharing your code or developing in a team, it can be difficult to drill through many separated methods to understand what is happening. I think you can never comment code too much. Thanks, Tim, for your comments, I was not aware that it had been discussed before. Tom. => => I think one reasonable answer to this is that dtml is not really => designed for code. If you have logic expressed in dtml that is => non-trivial enough to benefit from commenting, then dtml is probably => not the best language to express it in. => => (all, IMO). => => => => Toby Dickenson => tdickenson@geminidataloggers.com => => _______________________________________________ => 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 ) => _______________________________________________ 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 )
Fritz Mesedilla writes:
i read somewhere i need to upgrade python to 2.1. what else do i need like do i need other updates in order for me to update python? The easiest thing is to just try it.
Fetch the binary release of Python 2.1 for your architecture and start it. Worked without problems for me... Dieter
On Wed, 25 Jul 2001, Toby Dickenson wrote:
On Wed, 25 Jul 2001 18:51:47 +1000, "Tom Cameron" <tom@mooball.com> wrote:
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 think one reasonable answer to this is that dtml is not really designed for code. If you have logic expressed in dtml that is non-trivial enough to benefit from commenting, then dtml is probably not the best language to express it in.
Toby & others -- I'm not sure that's as reasonable as we'd like. There are many times where a moderate amount of logic in DTML is perfectly acceptable. Plus, even 'non-logic' can stand to be documented (ie, why are you including this piece of information? why are you creating a nested table, etc.) Here, we tend to use <dtml-comment>, and when that just seems too awful (too long, too hard to spot among the "real" tags), we use <!-- -->. Something like <// //> would be great. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
I think one reasonable answer to this is that dtml is not really designed for code. If you have logic expressed in dtml that is non-trivial enough to benefit from commenting, then dtml is probably not the best language to express it in.
That same argument has been used justify the hideous sequence-item (minus) problem for too long IMO. My only real beef is that the code inside a dtml-comment had to be synactically correct. I remember a patch for that a while ago, dont know if it ever got put in though... Cheers. -- Andy McKay.
Andy McKay wrote:
That same argument has been used justify the hideous sequence-item (minus) problem for too long IMO. My only real beef is that the code inside a dtml-comment had to be synactically correct. I remember a patch for that a while ago, dont know if it ever got put in though...
Probably not, *sigh* ...and we're still stuck with _.getitem('sequence-item',0) and the like :-S Just repeat the mantra: maybe-opening-the-cvs-will-help, etc cheers, Chris
Tom Cameron wrote:
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 agree with Tom on all his points. This has been discussed before and I think it merits another round. IIRC, it just didn't have a high enough priority at the time for ZC to put effort into. Maybe someone inside/outside of ZC, (with the ability) will find time to solve this. ??? -- Tim Cook, President - Free Practice Management, Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
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 )
participants (10)
-
Andy McKay -
Chris Withers -
Dieter Maurer -
Fritz Mesedilla -
Joel Burton -
Tim Cook -
Toby Dickenson -
Tom Cameron -
Tom Cameron -
Tommy Johnson