Live data from Hacker News

Don’t Make Me Write HTML

linux-mag.com

21–30 of 36 posts

Re: Don’t Make Me Write HTML

#21
post #7

Oh please. The time you spend learning HAML or Markdown (and all their potential intricacies) could be better spent learning to write clean HTML. I'm sure that both of those "alternatives" have their own quirks that must be worked around, not to mention the fact that you don't know exactly what HTML the parsers will spit out (yes, you can learn the output, I suppose, but why?). I can see these tools being useful in c…

You are completely missing the point of HAML. HAML is for people who know and use raw HTML, but who would rather not spend time on typing closing tags and all other syntatic sugar and line noise. HAML allows writing pages using leaner and more concise markup, all the while improving its readability.

> rather not spend time on typing closing tags

Isn't that what Emacs is for?

Re: Don’t Make Me Write HTML

#22
post #13

The closing tags of HTML and XML are a nuisance. In SGML (their common predecessor), named closing tags were optional (you used ), but were deliberately made mandatory in HTML and XML, to improve readability of long documents. It was contentious at the time, and it still is. But we must at least accept the data points that both HTML and XML have been phenomenally successful , without knowing for sure whether this par…

The main reason that SGML allowed closing tags to be optional was that it was 80s technology and storage was expensive.

To omit tags you needed a DTD that allowed the parser to infer where the close tags should go.

Enforcing the use of close tags in XML meant that building a parser was much simpler and that you no longer had to supply a DTD which I think were probably very instrumental in XML's success.

Re: Don’t Make Me Write HTML

#23

Don't make me click past an advertisement. I mean, what the hell? Since when did super-obtrusive advertising not alienate people? (It doesn't show up all the time, so you may not have seen it.)

I saw it for each of the 2 pages.

Re: Don’t Make Me Write HTML

#24
post #21

Earlier quoted context omitted.

You are completely missing the point of HAML. HAML is for people who know and use raw HTML, but who would rather not spend time on typing closing tags and all other syntatic sugar and line noise. HAML allows writing pages using leaner and more concise markup, all the while improving its readability.

> rather not spend time on typing closing tags Isn't that what Emacs is for?

Vim!

Although I must admit you've got a point there, it's a bit like Atwood's indentation piece yesterday, why bother fussing over that when your editor can sort it for you?

Re: Don’t Make Me Write HTML

#25

Don't make me click past an advertisement. I mean, what the hell? Since when did super-obtrusive advertising not alienate people? (It doesn't show up all the time, so you may not have seen it.)

I didn't see it the second time I clicked the link so I don't think it's something the linker can control.

Re: Don’t Make Me Write HTML

#26
post #24
post #21

Earlier quoted context omitted.

> rather not spend time on typing closing tags Isn't that what Emacs is for?

Vim! Although I must admit you've got a point there, it's a bit like Atwood's indentation piece yesterday, why bother fussing over that when your editor can sort it for you?

The point is that HTML is a standard format that many tools and people are familiar with. HAML is not. While HAML might be more succinct, there is a tradeoff being made that is probably not appropriate for all situations.

Re: Don’t Make Me Write HTML

#27
post #19

Earlier quoted context omitted.

I think you'd be surprised at just what you're allowed to omit in HTML. For example, the following document is valid HTML 4.01 Strict: The 'html', 'head' and 'body' elements -- opening and closing -- are inferred at the correct points by a compliant parser, as is the closing of the lone 'p' element. Once upon a time on my personal blog, I used minimal HTML 4.01 Strict (omitting tags and other bits of syntax whenever…

You're right, I'd forgotten about omitting the closing , but I think that's the only one (omitting a whole element - both open and close - is something different). Of course, in practice, most HTML parsers will do a wonderful job of interpreting malformed HTML.

It's not the only one. You can omit closing tags for td, tr, th, li, and probably others I don't remember. I actually do this; it doesn't make the resulting document any less clear for humans, and so if I'm typing it myself, there's little point in inserting them.

Re: Don’t Make Me Write HTML

#28
post #26
post #24

Earlier quoted context omitted.

Vim! Although I must admit you've got a point there, it's a bit like Atwood's indentation piece yesterday, why bother fussing over that when your editor can sort it for you?

The point is that HTML is a standard format that many tools and people are familiar with. HAML is not. While HAML might be more succinct, there is a tradeoff being made that is probably not appropriate for all situations.

I can agree with that, I wouldn't use a code-based markup generator simply because I couldn't see how you'd add design-based containers and things in there. Seems to eb good at producing semantic content markup, but not for full pages.

Re: Don’t Make Me Write HTML

#29
post #10
post #7

Oh please. The time you spend learning HAML or Markdown (and all their potential intricacies) could be better spent learning to write clean HTML. I'm sure that both of those "alternatives" have their own quirks that must be worked around, not to mention the fact that you don't know exactly what HTML the parsers will spit out (yes, you can learn the output, I suppose, but why?). I can see these tools being useful in c…

I would agree with you if you were talking simply about Markdown, but it seems you don't understand the point of HAML. Markdown is a complex syntax that loosely translates to half of HTML. It's good for user-input, because it's designed to be written like users already write stylistic formatting when the result will be plain ASCII, but it's not HTML. HAML is HTML—it's a one-to-one conversion—but it's simpler and more…

After looking into HAML again (I've looked at it before, and I'll admit, I clearly missed the point), I'll concede.

It does make HTML look significantly cleaner since it seems to run along the same general concept as Python (indents are blocks), and that is something I can support.

I'll be looking into giving it a try next time I have a good chance to...I appreciate the explanation.

Re: Don’t Make Me Write HTML

#30
post #10
post #7

Oh please. The time you spend learning HAML or Markdown (and all their potential intricacies) could be better spent learning to write clean HTML. I'm sure that both of those "alternatives" have their own quirks that must be worked around, not to mention the fact that you don't know exactly what HTML the parsers will spit out (yes, you can learn the output, I suppose, but why?). I can see these tools being useful in c…

I would agree with you if you were talking simply about Markdown, but it seems you don't understand the point of HAML. Markdown is a complex syntax that loosely translates to half of HTML. It's good for user-input, because it's designed to be written like users already write stylistic formatting when the result will be plain ASCII, but it's not HTML. HAML is HTML—it's a one-to-one conversion—but it's simpler and more…

Having had to use and debug HAML before, I absolutely hate it. I would argue that it is more difficult to read HAML and leads to buggier code. Missing what amounts to two spaces can break your layout without you realizing it until much later.

This is especially true if you use a CSS framework where you have lots of nested elements with several classes each.

Post reply on HN