News for hackers. Stuff that matters.
Re:The thing I hate about HTML by lhorie on Thursday July 15, 2010 @09:44AM (#1517731)
If typing is the problem, there's the zen coding plugin to alleviate it

http://code.google.com/p/zen-coding/

As far as ending tags go, HTML actually allows optional closing tags in some elements (http://www.w3.org/TR/html401/index/elements.html) and the proposed idea of using </> would cause confusion:

  <ul>
     <li>bla
  </> <- what did I close here?
Re:The thing I hate about HTML by jacobolus on Thursday July 15, 2010 @11:24AM (#1518074)
> [...] cause confusion: [...] ← what did I close here?

This was covered in TFA, except that JGC apparently thinks that having optional tags is an attempt at DWIM that’s more trouble than it’s worth:

> The browser magically says: “Oh, he must have meant to close that <p> tag so I'll do it for him.” [...] Given that the tags are meant to be balanced there's no reason to force the author to figure out which tags they want to balance and force them to write it down. It adds nothing.

Personally, though, I think implicit end tags are just fine, as long as they’re clearly documented and browsers have a standardized & predictable parsing approach.

Re:The thing I hate about HTML by lhorie on Thursday July 15, 2010 @01:33PM (#1518466)
>> This was covered in TFA

Not exactly... he basically said "let's drop the current spec and use lisp".

The thing I noticed when looking at language design though is that it's really easy to say "language X should look like Y" but overlook something that makes the whole proposal a really bad idea. Case in point: can you spot the problems on his lisp example? (hint: elements vs text nodes, required escape sequences)

Re:The thing I hate about HTML by jacobolus on Thursday July 15, 2010 @02:15PM (#1518602)
Well, okay. What I meant was that your criticism implied that he didn’t understand/address implicit tags, while he clearly actually did, but just suggested they be dropped.

I also hope his examples were more like a sketch than a careful proposal – otherwise, as you said, there’s a lot of ambiguity.

Anyway, there are clear advantages and disadvantages to both models. I’m not personally convinced that either HTML or S-expressions is an especially good document format, at least not as far as a human trying to create a document is concerned, but fortunately these kinds of languages are easy enough to generate that the original source language can pretty much look like whatever someone can imagine.