Hacker Newsnew | past | comments | ask | show | jobs | submit | bazoom42's commentslogin

The fundamental problem is XML was designed for textual markup formats but ended up getting used mostly for structured data. Many of the features like element/attribute distinction and mixed content is necessary for markup but unnecessary complexity for structured data.

JSON is perhaps an accident of history rather than deliberately designed, but for structured data interchange it is better because it is simpler.

Just like XML, JSON os getting used outside of its area. Using JSON for configuration files is absurd, since it doesn’t allow comments.


No, Denmark cannot do that. Denmark does not own Greenland.

Greenland has a parliament and manages its own domestic affairs. Denmark manages some domains like foreign and defense policy, but Greenland governs its own territory.


It would also force browsers to implement multiple slightly different engine modes, vastly complicating the browser code.

There are already a few cases, eg quirks mode vs standards mode and “use strict” mode, which was considered necessary for moving forward, but clearly it also complicates things for browsers. We dont want more modes than what is necessary.


The monty hall problem is often stated in such a way multiple interpretations are possible. I don’t know how exactly you state the problem, but have you considered you might have stated it wrongly or ambiguously?


Yes.

I have stated, explicitly, at the beginning, that the person opening the doors knows where the prize is, will only open doors without a prize and that the prize doesn't change positions.

This is demonstrated by the fact that when we actually play the game, I write the door number down on a piece of paper before the game starts.

This supposed ambiguity is touted as the key to why the puzzle is so difficult but, in my experience, it makes absolutely no difference.


Syntax errors are not fatal in CSS. CSS has detailed rules for how to handle and recover from syntax errors, usually by skipping the invalid token. This is what allows introducing new syntax in a backwards-compatible manner.


Why did markdown become popular when we already have html? Because markdown is much easier to write by hand in a simple text editor.

Original SGML was actually closer to markdown. It had various options to shorten and simplify the syntax, making it easy to write and edit by hand, while still having an unambiguous structure.

The verbose and explicit structure of xhtml makes it easier to process by tools, but more tedious for humans.


Personally I think Markdown got _really_ popular not because it is easier to write but because it is easier to read.

It’s kind of a huge deal that I can give a Markdown file of plain text content to somebody non-technical and they aren’t overwhelmed by it in raw form.

HTML fails that same test.


People had already ditched writing HTML for years before Markdown came out.

People were just using other markup languages like rST.

Other attempts had already proven HTML to be a bad language for rough documentation. Someone then just needed to write a spec that was easy to implement and Markdown was that.


Or because it was the default in GitHub with an ad hoc renderer.


Markdown has been extremely popular since far before GitHub existed.


I'm sure Markdown was already popular, but I agree with the OP that GitHub made it orders of magnitude more popular.

Previously its popularity was somewhat similar to RST.


Sure, but it became kind of the default with GitHub taking a lead position in code repository services.


Imho the real strength of markdown is it forces people to stick to classes instead of styling. "I want to write in red comic Sans" " I don't care, you can't".

And markdown tables are harder to write than HTML tables. However, they are generally easier to read. Unless multi line cell.


I usually just write html tables, then convert to markdown via pandoc. It's a crazy world we live in.


Is it really that much easier to write `<br>` and know that it isn't a problem, than just write `<br />`?


It’s much easier to have to remember fewer rules and for things to be ok if you get some wrong, yes.

Especially for casual users of HTML.


Bad reasoning.

“Always close your tags” is a simpler rule (and fewer rules, depending how you count) than “Close your tags, except possibly in situations A, B, C…”.


I've been closing my tags for 30 years and I assume that I will for the rest of my days. I like that it validates as XML. Historically I used XSLT a LOT.


It triggers the linters so often. I shall keep my <input> tag open.


<script /> is invalid HTML, and <img></img> is also invalid HTML. There's no way to avoid knowing HTML syntax.


But learning about self closing tags is an additional rule


User input data is always to be treated as suspect when it reaches the server and needs to be scanned and sanitised (if necessary) before accepting it for processing. Markdown makes this a lot easier to do and this is why it became popular.

No. P elements does not nest, so this is parsed as: <p></p><p></p>


But not closing <p> etc has always been valid HTML. Back from SGML it was possible for closing tags to be optional (depending on the DTD), and Netscape supported this from the beginning.

Leaving out closing tags is possible when the parsing is unambigous. E.g <p>foo<p>bar is unambiguous becuse p elements does not nest, so they close automatically by the next p.

The question about invalid HTML is a sepearate issue. E.g you can’t nest a p inside an i according to the spec, so how does a browser render that? Or lexical error like illegal characters in a non-quoted attribute value.

This is where it gets tricky. Render anyway, skip the invalid html, or stop rendering with an error message? HTML did not specify what to do with invalid input, so either is legal. Browsers choose to go with the “render anyway” approach, but this lead to different outputs in different browsers, since it wasn’t agreed upon how to render invald html.

The difference between Netscape and IE was that Netscape in more cases would skip rendering invalid HTML, where IE would always render the content.


> but I'm afraid we got html5 and just stopped there.

They dropped numbered versions. Now it is just HTML which is continuously evolved in a backwards-compatible manner.

> And if there will be an html6 why can't we just state "use version 5 in this document"

Because browser vendors are opposed to explicit versioning, since it introduces multiple rendering modes.


Stored procedures are great for bulk data processing. SQL natively operates on sets, so pretty silly to pass a dataset over the wire for processing it iteratively in a less efficient language, and then transfer the resultset back to the database.

Like any tool, you just have to understand when to use it and when not to.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: