<div>Thanks for the feedback on the proposal. It is good to hear some criticism- that means there are people using hamlet! So we have heard from current users now- can we get feedback from those not using hamlet? Does the new syntax tempt you into switching? If you were forced into a project with hamlet, which syntax would you like best? Does anyone think that designers would be more comfortable with the new syntax?</div>

<div><br></div><div>I would like to note another possible benefit to the proposal noted by a commenter on Michael&#39;s blog- the removal of the &#39;%&#39; character means that instead of signifying variable interpolation with &#39;$&#39; it could be done with the &#39;%&#39;, making the syntax uniform across hamlet, cassius, and julius.</div>

<div><br></div><div><div>I would like to be clear on the design goal of being closer to html. All other things being equal, it is simply about avoiding a larger mental overhead when switching between html and hamlet. The new syntax does not mean we are &quot;writing html&quot; or have any &quot;constraints&quot; not already present in hamlet. It simply means attributes use a space instead of a &#39;!&#39;, and tags begin with a &#39;&lt;&#39; instead of a &#39;%&#39;, and are separated with their inner text by a &#39;&gt;&#39; instead of a space. While the proposal discusses the possibility of allowing things like closing tags, that would be optional if it were implemented.</div>

<div><br></div><div>Reducing the mental &quot;context switch&quot; could be useful for existing hamlet users that also works with html in other projects. But it is largely about getting more users of hamlet, particularly when they start a new project. I would not expect many projects to switch a project over, and closeness to html when switching an existing project over doesn&#39;t matter much once converters are available, and the larger the project, the more practical it is to write a converter. I see the real practical use on a smaller scale- if you want to copy and paste some html into your file, including html from a more traditional templating language where a converter may not available.</div>

<div><br></div><div>Space-based attributes:</div><div>Are there any objection to the *concept* of the change to use a space with attributes instead of a &#39;!&#39;?. This would actually make hamlet *more* similar to HAML.</div>

<div><br></div><div>The difficulty in implementation is with determining the end of the attribute portion of the tag. For &#39;%body id=the-body&#39; there would be ambiguity as to whether the id started an attribute or inner text. Even worse is an attribute without a value &#39;input type=checkbox checked&#39;. One technique is to assume it is an attribute if an &#39;=&#39; sign is present- requiring escaping the &#39;=&#39; sign, and requiring a (possibly empty) value for every attribute. HAML handles attributes by requiring opening and closing symbole: &#39;(attribute=name attribute2=name)&#39;, which looks nice, but I would much rather have white space to begin attributes, and the closing character is forced on you when there is no inner text.</div>

<div>Following my original proposal, the attributes could have a closing character that is optional when there is no text.</div><div><br></div><div> %body id=the-body class=the-class&gt;Inner Text</div><div><br></div><div>

I could appreciate that this might look peculiar to someone when the tag leads with a &#39;%&#39; instead of a &#39;&lt;&#39; as in the original proposal. I think &#39;&amp;&#39; could be a lot more appealing and signifies &#39;and there is text&#39;, also similar to how it signifies more parameters in a url.</div>

<div><br></div><div> %body id=the-body class=the-class&amp;Inner Text</div><div><div><br></div><div>So I am still proposing the original proposal. If the original is not accepted, or if we want more time to think about it or otherwise an intermediate step is desired I would still propose using a space-based attribute syntax. We could also consider the possibility of allowing both the &#39;%&amp;&#39; and the &#39;&lt;&gt;&#39; syntaxes now that they would be very similar. However, I would strongly argue for using the html-compatible syntax. Those whose senses are offended by a lone opening &#39;&lt;&#39; can still add the &#39;&gt;&#39; and justify that it prepares them for adding inner text.</div>

<div><br></div><div class="gmail_quote">On Sun, Dec 12, 2010 at 3:00 AM,  <span dir="ltr">&lt;<a href="mailto:web-devel-request@haskell.org">web-devel-request@haskell.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Send web-devel mailing list submissions to<br>
        <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:web-devel-request@haskell.org">web-devel-request@haskell.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:web-devel-owner@haskell.org">web-devel-owner@haskell.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of web-devel digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: proposal for hamlet-like syntax that is more compatible<br>
      with html (Michael Snoyman)<br>
   2. Re: proposal for hamlet-like syntax that is more compatible<br>
      with html (Alexandros Salazar)<br>
   3. Re: proposal for hamlet-like syntax that is more compatible<br>
      with html (Alexander Dunlap)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 11 Dec 2010 17:48:48 +0200<br>
From: Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>
Subject: Re: [web-devel] proposal for hamlet-like syntax that is more<br>
        compatible with html<br>
To: Simon Michael &lt;<a href="mailto:simon@joyful.com">simon@joyful.com</a>&gt;<br>
Cc: <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
Message-ID:<br>
        &lt;AANLkTinumxoNV-efehgrVBUnoNUYvRB1ijC01aN6Pv=<a href="mailto:6@mail.gmail.com">6@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Alright, at this point I&#39;ve only heard positive things about this<br>
syntax change. Does anyone want to volunteer to try and tackle this,<br>
or will this need to wait till I can get around to it? Fair warning:<br>
I&#39;m likely to try to deal with the WAI + enumerator and xml-enumerator<br>
tasks first. If someone wants to take a crack at the Hamlet changes,<br>
I&#39;ll be happy to review things.<br>
<br>
Michael<br>
<br>
On Sat, Dec 11, 2010 at 2:38 AM, Simon Michael &lt;<a href="mailto:simon@joyful.com">simon@joyful.com</a>&gt; wrote:<br>
&gt; I support this proposal&#39;s goal, and would be fine with rewriting my<br>
&gt; templates.<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; web-devel mailing list<br>
&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sat, 11 Dec 2010 11:17:37 -0500<br>
From: Alexandros Salazar &lt;<a href="mailto:nomothetis@gmail.com">nomothetis@gmail.com</a>&gt;<br>
Subject: Re: [web-devel] proposal for hamlet-like syntax that is more<br>
        compatible with html<br>
To: <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
Message-ID:<br>
        &lt;<a href="mailto:AANLkTikxJfPFOnD8Fzo9-bpH9g8Z6S6n8aCwB9%2BkvbAM@mail.gmail.com">AANLkTikxJfPFOnD8Fzo9-bpH9g8Z6S6n8aCwB9+kvbAM@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
My belated 2c (sorry, work has been keeping me away from things Yesod and<br>
Haskell):<br>
<br>
1. The key reason I switched to Yesod was Hamlet. I&#39;m very new to Haskell,<br>
and I wanted to try developing a webapp in it; when I looked at the various<br>
frameworks, my main question was &quot;What will require me to learn the least<br>
new stuff, while still giving me a full Haskell-based development<br>
experience?&quot; Yesod was the answer, because I was already familiar with Haml.<br>
So, it is one less thing a large swath of people need to learn when they<br>
decide to give Yesod a try. And at least in my case, it was a deciding<br>
factor.<br>
<br>
2. I&#39;m not convinced closeness to HTML is a design goal. My experience is<br>
again limited, but I wouldn&#39;t expect many people to switch existing projects<br>
to Yesod (or really, from any framework to any other); therefore, the idea<br>
that someone will have a bunch of HTML to be converted as simply as possible<br>
to whatever templating language we use seems remote.<br>
<br>
3. Along the same lines, the reason for the existence of templating<br>
frameworks like Haml and Hamlet is precisely that people don&#39;t enjoy writing<br>
HTML: why would we constrain ourselves by similarity to something people<br>
have put large (and creative) amounts of effort into avoiding? I think it is<br>
unduly limiting.<br>
<br>
4. I do believe there are some issues with Hamlet; in fact, the issues<br>
raised by Greg are exactly the issues I have. I don&#39;t see having a<br>
Yesod-specific templating language as the solution, unless this new syntax<br>
gives Yesod such a big productivity boost compared to using Hamlet that it&#39;s<br>
worth putting in the effort.<br>
<br>
In brief, I think Hamlet is 95% of the way there, and that Michael has done<br>
a great job with it. It seems easier to take it another 4% and get it to 99%<br>
than it would be to rewrite the syntax from scratch. I don&#39;t view HTML<br>
similarity as a bonus (or a malus, either way). Maintaining (and furthering)<br>
similarity with Haml seems worthier goal, given how many people use it, are<br>
familiar with it, and love it; it will ease adoption.<br>
<br>
I hope this all made sense, and that I didn&#39;t start an argument about bike<br>
shed colors... ;-)<br>
<br>
Alexandros<br>
<br>
<br>
<br>
On Sat, Dec 11, 2010 at 10:48 AM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;wrote:<br>
<br>
&gt; Alright, at this point I&#39;ve only heard positive things about this<br>
&gt; syntax change. Does anyone want to volunteer to try and tackle this,<br>
&gt; or will this need to wait till I can get around to it? Fair warning:<br>
&gt; I&#39;m likely to try to deal with the WAI + enumerator and xml-enumerator<br>
&gt; tasks first. If someone wants to take a crack at the Hamlet changes,<br>
&gt; I&#39;ll be happy to review things.<br>
&gt;<br>
&gt; Michael<br>
&gt;<br>
&gt; On Sat, Dec 11, 2010 at 2:38 AM, Simon Michael &lt;<a href="mailto:simon@joyful.com">simon@joyful.com</a>&gt; wrote:<br>
&gt; &gt; I support this proposal&#39;s goal, and would be fine with rewriting my<br>
&gt; &gt; templates.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; web-devel mailing list<br>
&gt; &gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt; &gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; web-devel mailing list<br>
&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://www.haskell.org/pipermail/web-devel/attachments/20101211/1d41e534/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/web-devel/attachments/20101211/1d41e534/attachment-0001.htm</a>&gt;<br>


<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sat, 11 Dec 2010 18:32:51 -0800<br>
From: Alexander Dunlap &lt;<a href="mailto:alexander.dunlap@gmail.com">alexander.dunlap@gmail.com</a>&gt;<br>
Subject: Re: [web-devel] proposal for hamlet-like syntax that is more<br>
        compatible with html<br>
To: Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>
Cc: Simon Michael &lt;<a href="mailto:simon@joyful.com">simon@joyful.com</a>&gt;, <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
Message-ID:<br>
        &lt;AANLkTinqnFVeCyOHLudnxpKGXWXFGmsHrFVX=<a href="mailto:6eBTivr@mail.gmail.com">6eBTivr@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
I would prefer that the bikeshed stay the color it already is. ;) The<br>
syntax is easier for me as it is different from HTML. The HTML-like<br>
syntax looks to me like invalid HTML and is more difficult to read.<br>
<br>
Alex<br>
<br>
On Sat, Dec 11, 2010 at 7:48 AM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>
&gt; Alright, at this point I&#39;ve only heard positive things about this<br>
&gt; syntax change. Does anyone want to volunteer to try and tackle this,<br>
&gt; or will this need to wait till I can get around to it? Fair warning:<br>
&gt; I&#39;m likely to try to deal with the WAI + enumerator and xml-enumerator<br>
&gt; tasks first. If someone wants to take a crack at the Hamlet changes,<br>
&gt; I&#39;ll be happy to review things.<br>
&gt;<br>
&gt; Michael<br>
&gt;<br>
&gt; On Sat, Dec 11, 2010 at 2:38 AM, Simon Michael &lt;<a href="mailto:simon@joyful.com">simon@joyful.com</a>&gt; wrote:<br>
&gt;&gt; I support this proposal&#39;s goal, and would be fine with rewriting my<br>
&gt;&gt; templates.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; web-devel mailing list<br>
&gt;&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; web-devel mailing list<br>
&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
web-devel mailing list<br>
<a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
<br>
<br>
End of web-devel Digest, Vol 16, Issue 6<br>
****************************************<br>
</blockquote></div><br></div></div>