<div class="gmail_quote"><div><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">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.</span></div>
</div></blockquote></div><div><br></div><div>True. On the other hand, it would break the similarity of Hamlet with jQuery and other JS frameworks that identify ids with %. A trade-off, to be sure, but one worth mentioning. I know I use a lot more identifiers than interpolation in my julius, so it&#39;s easier for me to go &quot;oh, right, something is weird with interpolation.&quot;</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div>&lt;snip context-switching, html-compatibiltiy&gt;</div></div></blockquote><div><br></div><div>I think Chris Smith made a good argument here: sometimes it&#39;s more annoying to have to deal with a little quirk here and there than it is to have to change completely.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><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></blockquote><div><br></div><div>Yes, and I definitely would like that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><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></blockquote>
<div><br></div><div>This is an interesting concept. Going back to Chris&#39; argument, the opening and closing symbols for the assignments will have the advantage that they are expected. As an alternative, since this is Haskell we&#39;re talking about, could we have *two* characters to signify the end, say &quot;-&gt;&quot;? I think it would work nicely, as one can view a tag as &quot;returning&quot; its contents. I&#39;m still a fan of the opening and closing symbols, though.</div>
<div><br></div><div>It is my belief that with Hamlet we should stay as close to Haml as consistent with taking advantage of the capabilities of Yesod. The names are too similar to betray that expectation, so every difference should be for a specific Yesod-related reason that people should find easy to remember. For instance, different interpolating symbols for variables and type-safe URIs makes sense, because type-safe URIs are an important Yesod feature.</div>
<div><br></div><div>Basically, if we reach an agreement that we would like a different, more Yesod-specific templating language, I think we should seriously consider forking Hamlet and calling it something else (Othello? :-) ). We could then switch to supporting Othello full-time and deprecate Hamlet, but at least people will not expect it to be like Haml.</div>
<div><br></div><div>Alexandros</div></div>