5 ms·
I understand the rationale and how CommonMark parsing is not trivial and could be simplified, but the resulting language misses, for me, the best part of Markdo
by adlpz 4y ago
I understand the rationale and how CommonMark parsing is not trivial and could be simplified, but the resulting language misses, for me, the best part of Markdown: that it happens to be pretty much just what I'd write in plain text anyways.
The odd newline requirements on lists and blocks, the special syntax for raw HTML and so on makes Djot feel more artificial to me.
- layer8 4y agoWhat odd newline requirements? I skimmed the syntax reference and couldn’t find any.
- gernb 4y agoIn markdown My favorite number is probably the number 1. It's the smallest natural number that is > 0. With pencils, though, I prefer a # 2. is a paragraph, a list item, a block quote, and a heading (4 things). In djot it's just a single paragraph. If you want it to be 4 things you have to add a newline between each one. Personally I think djot gets this right.
- layer8 4y agoAh, thanks. I agree that it makes sense to require an empty line before block elements that typically also require an empty line after.
- bccdee 4y agoAgreed with the exception that djot also applies this to nested lists, which I think is a huge misstep. User ergonomics are more important than convenient parsing, and while many markdown parsers interpret your example in an un-ergonomic way, djot rejects this: - foo - bar - baz - foobar and demands this: - foo - bar - baz - foobar which is an unergonomic choice.
- joshjob42 4y agoThis is so horrifying I did not believe you and had to go test to make sure. Jesus that's awful. Force a newline on me before a list? Ugh but fine. Force it for every sub bullet? No freaking way, that looks catastrophically bad. This forcing new lines thing almost totally eliminates any desire I have to experiment with it, when I was very excited about it when I first saw it come up. Hopefully they'll change their mind. They want source code to be readable then make a decision that makes our eyes bleed.
- jhoechtl 4y agoThis. The rationale of Djot's design decisions are sane. Heck, it's even understandable that lists 'require' the blank line. Yet blank lines in lists really break the reading flow. It would be worthwhile to sacrifice a pure design decision in favor of practicability and readability.
- fiddlosopher 4y agoThe motivation for this choice is not "convenient parsing" but deeper considerations of language design. As explained at https://github.com/jgm/djot#rationale https://github.com/jgm/djot#rationale , this choice follows from two desiderata: (1) "The syntax should compose uniformly, in the following sense: if a sequence of lines has a certain meaning outside a list item or block quote, it should have the same meaning inside it." (2) "The syntax should be friendly to hard-wrapping: hard-wrapping a paragraph should not lead to different interpretations, e.g. when a number followed by a period ends up at the beginning of a line." The document explains the compromise we made in commonmark to avoid the need for blank lines. Djot tries to be more principled.
- trynewideas 4y agoAlso preferring rST-style list syntax, requiring an empty line between parent and child lists. So: - list - sublist - sublist is valid Markdown but invalid djot, while - list - sublist - sublist is valid djot.
- qbasic_forever 4y agoExactly, the sublist newline stuff is a total nonstarter for me. Sorry, I guess I'll run a markdown parser that takes an extra second or whatever to run.
- 0cf8612b2e1e 4y agoThe fact that we cannot standardize on extensions means that markdown feels inadequate for more technical documents. If just a free more restrictions means I can easily add block annotations to everything, I will jump aboard immediately. That it is easier for parser writers is just a perk.
- chungy 4y agoI honestly don't get why Markdown became preferred in most projects over AsciiDoc.
- wnoise 4y agoHave you tried to parse it? Even the Swiss army knife of document formats, pandoc, only supports it as an output format.
- markstos 4y agoBecause people know and like Markdown. It’s good enough so they don’t go looking for a replacement. Markdown is used enough that you are going to need to know the syntax. So a competitor doesn’t just have to better, it has to have enough additional merits to be worth learning in addition to Markdown.
- nerdponx 4y agoAsciiDoctor and Org Mode both have substantial additional merits over Markdown, and have dedicated user bases. The problem nowadays is that of implementation availability.
- abathur 4y agoI suspect a lot of it's inertia from before the choice mattered or was actually reflected on (though I guess there are still plenty of projects changing). It's easy, most projects can satisfice with it, and people on the projects that can't satisfice with it may not think about markup enough to realize they're painting themselves into a corner until they have a big ballast of existing documentation to cope with? I've been fumbling around for how to convey signs that a project may need better tools (https://t-ravis.com/post/doc/what_color_is_your_markup/ https://t-ravis.com/post/doc/what_color_is_your_markup/) but it's been slow-going and I'm bearish on how well ~better-practices will spread.
- IshKebab 4y agoIf you just want the expressiveness of Markdown then that's fine, but this is targeted at the same space as AsciiDoc - writing big documents and even books. It's going to be painful doing that without the ability to add footnotes, cross references, figures, notes, etc. etc. I mean you can do it - look at all the RFCs for example - but they must have been unpleasant to write and they're certainly unpleasant to read.
- aidenn0 4y agoI wonder how much of that is famliarity? I find Asciidoc to be much closer to what I would write, as well as being more full-featured. It's much worse for parsing than even CommonMark though.