Comment

Comment by simias

>Furthermore the XML-based syntax is pretty ugly and needlessly verbose. It’s tiring to write by hand and just as tiring to parse or generate automatically.

What's even worse is that because XML is a garbage fire of a format, SVG actually builds its own micro-DSL to work around limitations.

So for instance you have something like:

    <circle cx="10" cy="10" r="2" fill="red"/>
Ok, fair enough. Readable, self-describing.

But then you have:

     <path d="M 10 10 H 90 V 90 H 10 L 10 10"/>
Oh. You can almost hear the designer saying "well fuck it, we'll just jam it all into a string.

The fact that SGML-based formats managed to become as popular as they are is really proof that there's something fundamentally rotten in software engineering.

I do quite like SVG though. I mean, if the alternative is drawing with CSS, it's pretty amazing. I don't really agree that it's hard to generate programmatically either, you just have to decide what subset of the format you need, look at what inkscape generates and go from there. If you need to generate basic shapes it's fairly straightforward.

parent simias 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton