[web-devel] Comments in Hamlet

Tim Matthews tim.matthews7 at gmail.com
Sun Aug 15 02:22:43 EDT 2010

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.

Tim Matthews
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100815/8ddad141/attachment.html

More information about the web-devel mailing list