[web-devel] Comments in Hamlet

Michael Snoyman michael at snoyman.com
Mon Aug 23 14:30:29 EDT 2010

On Sun, Aug 15, 2010 at 9:22 AM, Tim Matthews <tim.matthews7 at gmail.com>wrote:

> On Fri, Aug 13, 2010 at 6:04 AM, Michael Snoyman <michael at snoyman.com>wrote:
>> I'm talking about the latter: inserting comments that only exist in the
>> template and make no appearance in the generated HTML at all.
>> The reason to avoid the double dash is that it adds a brand new "special
>> string" to Hamlet. Frankly, I don't think a double dash is so uncommon--
>> it's often times used instead of an mdash, so I'd be very wary of doing
>> this.
> I was trying to wait for others opinion on this but can you please clarify
> on what you mean by "special string" and the issues around it. If it was me
> that was being unclear: I mean I can place "--" anywhere in my haskell
> source and the remainder of the line becomes a comment and will show in
> vim's syntax highlighter in a different color accordingly. If I were to
> place "--" in the quasi quoted hamlet template however, the syntax
> highlighter will show it in a different color because the haskell.vim file
> doesn't recognize the quasi quoter but in the generated html file the "--"
> and all the other text following actually appears. If quasi quotation was to
> be the primary way to use hamlet then I think "--" would give it that added
> level of consistency but in large scale projects it may be beneficial to
> have someone working on the hamlet files separately and therefore
> consistency doesn't really make much sense if quasi quoted became unpopular.
> I'm not convinced that the consistency of comment styles outweighs the
difficulty of having a new special character sequence in Hamlet; for now,
Hamlet comments will remain $#. Thanks for the feedback, sorry I'm going the
other way on it ;).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100823/773061f6/attachment.html

More information about the web-devel mailing list