Appendix B. FAQ

Q: Why didn't you just use XML and let style authors use XSLT?
Q: Why invent a whole new programming language and not just use, say, Perl and Safe.pm?
Q: Will there be an S1 to S2 converter?
Q: Why is S2 so large/complex/difficult?

Q:

Why didn't you just use XML and let style authors use XSLT?

A:

Because XSLT is ugly and difficult.[o]

Q:

Why invent a whole new programming language and not just use, say, Perl and Safe.pm?

A:

Believe me, a lot of options were considered. There are a number of reasons we "reinvented the wheel":

  • The other wheels weren't round.
  • Safe.pm isn't too safe.
  • By making our own domain language, we make it easy to do the things which are common/specific to this problem. A short list:

    • The common operation is print. So we made an expression statement starting with a string literal be a print statement on that expression.
    • Large blocks of text are printed often, so we wanted the Python-style triple-quoted string literals.
    • We wanted layers of functionality/overridability.
    • We wanted a graphical wizard to be able to look inside the layers and see what options are available.

  • It wasn't that hard.
  • The language is very similar to other languages which geeks are already familiar with. The learning curve isn't too steep.

Q:

Will there be an S1 to S2 converter?

A:

Short answer: No.

Long answer: Maybe, but we're not going to help make it. The problem is that there's no proper way to convert an S1 style to S2. A converter could be made, with much pain, but it'd generate totally ugly S2 code which ignores all the benefits of S2. The resultant code would be so horrid that the potential migrator from S1 would see it, cry, and never come back to S2, the auto-converted code having left such a rotten taste in his or her mouth.

Actually, what we hope will happen is that somebody (or many people) will get inspired and start making new style languages on top of S2, many of which would likely be targetted at the HTML-hacker audience who want a style system more like S1.

Q:

Why is S2 so large/complex/difficult?

A:

It's not, really. You're probably just overwhelmed and frustrated, hoping it was like S1 with more support for certain pages. Unfortunately, S1 was a dead-end and couldn't be usefully extended.

S2 has more than you'll ever use, but that's not to say the rest of it is a waste. Just because you only speak English, does that mean we shouldn't address the problem of internationalization?

S2's been designed to be as easy as possible on both regular users and programmers. Once you start creating/modifying S2 code, you should find it's not so bad. And once you have a wild idea of something you want to do with your style, it'll actually be possible... just consult the S2 core layer reference and figure out how to get what you're looking for.

Also, see the last paragraph to the previous question.