I think Markdown is great for what it is, a simple way to mark up text with some simple html, in a way that's still easily readable as plain text. I dislike most extensions to markdown, since the point, for me, is simple use cases only.
Haml is almost the complete opposite IMO, since reading a document formatted with Haml does not result in elegant plain text, and it's not designed specifically for simple use cases.
This mixture of the two really irks me, as a result.
Slim seemed extremely similar to Haml to me — the primary difference IIRC is that Haml uses more sigils (probably due to influence from Ruby). They both have that quality of basically reducing your document to a minimal syntax tree.
Seems pretty similar to pug/jade, other than not needing parentheses for tag attributes? (which admittedly, has annoyed me in pug) If I had to go to Ruby-land, I would use slim...
Looking at both and their timelines, I’d think pug may be based on slim which is a great thing.
Slim has been around for years, steadily improving and addressing corner cases.
I absolutely love it. Reduces typing by 50%, reading by 1000+%(as I re-read the code multiple times and it eliminates the multiple takes and looking for closing tags) and matches how my human brain thinks about markup.
I'm thinking these are "convergent evolution", especially since they arose in different language communities.
I totally agree that this is the best way to generate HTML. I use pug even for really tiny pages and templates. It amazes me that people like JSX, which seems like a total regression from building elements with function calls like React originally had. When I code Cycle.js in coffeescript it looks and feels a lot like pug; which is great.
Try turning it over to non-technical people. You will be surprised at how non-intuitive html can be, and what extremely nasty things they will do when they decide to learn just a little bit, ie style attribute hacking galore. If you want dead simple, consistently styled content to be written by non-technical folks, Markdown is much better IMHO.
This is something that can change with a bit of training.
All the "plain text" formatting languages tend to break down. They work until they don't and then somebody invents yet another text-based pseudo-markup language. Asciidoc is best of the worst but fundamentally it's a bad idea. If you're willing to make the investment in tools and training there's a lot of value in enabling people to write real HTML (and MathML) or, better, Docbook + domain-relevant XML that produces real UI-agnostic structured information.
The problem here is that the tools are terrible or expensive or bloated. There's no reason why this should be the case and it's likely a real market opportunity.
Agreed! If I need to debug it in chrome inspector (or similar) I don't like to have to think in terms of the abstraction I'm using to get the result I want.
Web development is complex enough (server side, js, css) without adding an abstraction layer to your markup too.
With SGML it's not an either-or. You can have both angle bracket markup syntax with HTML empty element rules, tag inference, and other short forms, as well custom Wiki syntax at the same time.
For example, you can say in SGML that the character '-' at the begin of a line when appearing below a particular parent element should start a line item, using a SGML shortref map/use declaration.
Blends particularly well with markdown eg. where in regular markdown you can use literal HTML, in markown+SGML you can make use of full SGML.
Haml is almost the complete opposite IMO, since reading a document formatted with Haml does not result in elegant plain text, and it's not designed specifically for simple use cases.
This mixture of the two really irks me, as a result.