5 ms·
> This feels incredibly verbose and error prone, not to mention confusing and hard to grok. That looks a lot less verbose, error-prone, confusing & hard-to-gro
by zeveb 9y ago
> This feels incredibly verbose and error prone, not to mention confusing and hard to grok.
That looks a lot less verbose, error-prone, confusing & hard-to-grok than actual HTML, don't you think? Or do you actually prefer the HTML below?
<form id="logform" class="nomargin">
<table style="border-collapse: collapse">
<tr><td colspan="2">username:</td></tr>
<tr><td colspan="2"><input id="loguser" class="txt" name="user" type="text" size="15"/></td></tr>
<tr><td colspan="2">password:</td></tr>
<tr><td colspan="2"><input id="logpass" class="txt" name="pass" type="password" size="15"/></td></tr>
<tr><td colspan="2"><input id="logmem" type="checkbox" name="mem"/>remember me</td></tr>
<tr><td colspan="2"><span id="logerror" class="error"/></td></tr>
<tr><td><input id="logbtn" class="btn" type="submit" value="Login" onclick="login(); return false"/></td>
<td><input class="btn" type="submit" value="Register" onclick="register(); return false"/></td>
</tr>
<tr><td nowrap="true" colspan="2" align="center" class="little"><a href="/password">what's my password?</a></td></tr>
</table>
</form>
For my money, the S-expression HTML is much easier to read & understand.
- dewski 9y agoYou may find varying answers depending on who you're asking and if they have any experience with Lisp. As someone who doesn't, the HTML example is 100% easier to read in my opinion coming from a Rails developer. You don't have to go against the grain to get the output you desire, you can just write it as it is intended to be rendered.