Hacker News new | ask | show | jobs
by adeptus 4224 days ago
Who the heck wants to type <html: before every single command? Waste of programmer's time, hard drive storage and bandwidth.
2 comments

Nobody, but that's not a problem with namespaces. Just a problem that they didn't specify a default.

Treat them like namespaces aka packages aka modules in programming languages and I don't see a downside. Import what you need, allowing defaults. You're able to override terms if you really need to with stacked imports. You're able to use conflicting terms by specifying the namespace. You're able to alias namespaces to convenient short-hand. i.e.:

  <acme:video>
    <src>https://blah</src>
  </acme:video>
Yes writing "html:" explicitly everywhere seems pretty silly. When the domain's primary purpose is writing HTML, that should obviously be the default/root namespace.

But adding support for alternatives on top of that...? Not seeing the evil there.

You don't have to. You can give a value for the root namespace instead.

Namespaces are needed for embedding things like SVG, MathML, etc. in HTML or XML documents.