6 ms·
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
by endtwist 18y ago
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 certain circumstances, such as a way to provide HTML-esque markup somewhere where you don't want to bother cleaning up someone else's potentially malicious HTML (a wiki, a comment form, etc.). However, for building actual websites, just do it the right way.
Sure, these alternatives are nice in that you can avoid the scary HTML, but in the end it is all HTML anyway -- so why not learn it from the start and produce better code than what a parser will spit out based on your abstraction?
- huhtenberg 18y agoYou 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.
- davidw 18y ago> rather not spend time on typing closing tags Isn't that what Emacs is for?
- RossM 18y agoVim! 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?
- davidw 18y agoThe 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.
- RossM 18y agoI 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.
- derefr 18y agoI 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 concise to write. It's what HTML should be: no closing brackets, no line noise, and simple syntax to access DOM-relevant attributes (class and id). If I had the option of immediately converting all HTML worldwide into HAML, and all HTML parsers into HAML parsers, I'd sign up in a second. Also, I don't need to see the raw HTML any more, because that's not the point: it's like looking at machine language instead of assembler. They're equivalent, so why read it the painful way? When debugging a page layout in HTML, I actually find it more useful to convert it into HAML first.
- collint 18y agoAmen brother! Preach it. Sing out the good word across the land. Over the hill-tops and down to the valley below. Everybody who knows HTML knows HAML. Actually learning HAML would have still given you time to write a paragraph complaining about it.
- endtwist 18y agoAfter 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.
- oneplusone 18y agoHaving 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.
- 18y ago
- hboon 18y agoMarkdown is for writing content. Content creators shouldn't need to write their content (blogs, news, whatever) in HTML. Markdown is for that and only that.