<div class="gmail_quote">On Fri, Mar 5, 2010 at 4:48 AM, iquiw <span dir="ltr">&lt;<a href="mailto:iku.iwasa@gmail.com">iku.iwasa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Johan,<br>
<div class="im"><br>
On Fri, Mar 5, 2010 at 6:18 AM, Johan Tibell &lt;<a href="mailto:johan.tibell@gmail.com">johan.tibell@gmail.com</a>&gt; wrote:<br>
&gt; Here&#39;s a proposal for a project I&#39;d be willing to mentor:<br>
&gt; = A high-performance HTML combinator library using Data.Text =<br>
<br>
</div>Nice project! I would like to see the project will be accepted.<br>
<br>
Perhaps it&#39;s not scope of the project, but if compatibility doesn&#39;t<br>
matter, I want new HTML library have uniform naming convention<br>
for functions that based on element or attribute.<br>
<br>
For example, function name should be;<br>
 - &quot;e_&quot; + element name (&quot;html&quot;, &quot;head&quot;, &quot;body&quot; =&gt; &quot;e_html&quot;, &quot;e_head&quot;, &quot;e_body&quot;)<br>
   &quot;a_&quot; + attribute name (&quot;href&quot;, &quot;id&quot;, &quot;class&quot; =&gt; &quot;a_href&quot;, &quot;a_id&quot;, &quot;a_class&quot;)<br>
or<br>
 - &quot;e&quot; + capitalized element name (&quot;html&quot;, &quot;head&quot;, &quot;body&quot; =&gt; &quot;eHtml&quot;,<br>
&quot;eHead&quot;, &quot;eBody&quot;)<br>
   &quot;a&quot; + capitalized attribute name (&quot;href&quot;, &quot;id&quot;, &quot;class&quot; =&gt; &quot;aHref&quot;,<br>
&quot;aId&quot;, &quot;aClass&quot;)<br>
<br>
or some other convention.<br></blockquote><div><br></div><div>I think I would use the module system for namespacing rather than using function prefixes. Like so:</div><div><br></div><div>import Text.Html as E</div><div>import qualified Text.Html.Attribute as A</div>

<div><br></div><div>E.html ! [A.class_ &quot;my-class&quot;] (... more combinators ...)</div><div> </div><div>(Assuming that &quot;!&quot; is used to introduce attributes.)</div><div><br></div><div>This allows you to use the element names and/or the attribute names unclassified if you so desire.</div>

<div><br></div><div>html ! [class_ &quot;my-class&quot;] (... more combinators ...)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Function names in the &#39;html&#39; library are unpredictable from<br>


corresponding element/attribute names...<br>
 (&quot;head&quot;, &quot;base&quot;, &quot;a&quot; =&gt; &quot;header&quot;, &quot;thebase&quot;, &quot;anchor&quot;)<br></blockquote><div><br></div><div>I&#39;m of the same opinion. The combinators should match the element/attribute names as far as possible. The rule that I had in mind was that the combinators should have exactly the same name as the corresponding element/tag except when the name collides with a keyword (e.g. &quot;class&quot;). If the name collides with a keyword we could e.g. always append a &quot;_&quot;.</div>

<div> </div><div>Cheers,</div><div>Johan</div><div><br></div></div>