Hacker News new | past | comments | ask | show | jobs | submit login

Wow, I wasn't aware there were any XSLT "fans" out there. I wonder where the author has been hanging out to find them.



You find them, particularly in places where XML is taken too seriously. Also in places staffed with people who see unmaintainable code as their ticket to job security.

One trouble is that you know there's a cliff out there. There are some simple tasks that can be done with an XSLT that's just beautiful. But try to change what it does, and you reach this point where it becomes incomprehensible.

Back in the day we used to wonder if XSLT was Turing complete -- some guys wrote a paper and proved it, but that's the problem with XSLT. If it takes computer scientists half a decade to figure out if it's Turing complete or not, it's completely incomprehensible.


I am one. But I do a lot of work with XML documents (not just data in XML form, but documents marked up in XML). XSLT is an invaluable tool for this problem domain, but it's a relatively small niche. I can easily imagine programmers getting frustrated with it if they aren't using it for its intended purpose, or even if they haven't yet grokked how it's supposed to work.

It's probably not quite a functional language by most definitions, but it has a lot of features common to functional languages, including immutable variables, no side effects, XSLT 2.0 does have first class functions, recursion, etc. The Saxon implementation of XSLT 2.0 even has lazy sequences (I'm not sure if that's a language thing, or just that implementation).

Without knowing what the OP is having to deal with, I can't really evaluate his complaint. I've certainly seen some hideous XSLT, but it doesn't have to be hideous, and it's great for the (pretty narrow) domain it was intended for.

You can abuse any programming language—I don't think XSLT is particularly special in that regard.


The BBC used to use XSLT a lot for templating web pages, and had a small cluster of XSLT adherents working for them. I believe they've mostly switched to PHP templates now.


"I believe they've mostly switched to PHP templates now." Oh my god make me unknow this.

(XSLT does actually have a standard, syntax checking and built-in context-sensitive quoting)


Reminded me of https://xkcd.com/224/: "honestly, we hacked most of it together with perl"


> My god, it's full of car's!

lmao. Thanks, hadn't seen that one.


There are, I have met a few. Not one myself, but I do like the fact that it escapes properly, which most people working on templating solutions havent bothered to do.


I know two.




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

Search: