3 ms·
Another (properly functional) homoiconic language that enjoyed mainstream adoption briefly in '00s is XSLT. Its metaprogramming features were rather widely used
by nine_k 2y ago
Another (properly functional) homoiconic language that enjoyed mainstream adoption briefly in '00s is XSLT. Its metaprogramming features were rather widely used, that is, producing an XSLT from XSLT and maybe some more XML, instead of hand-coding something repetitive, was rather normal.
The syntax was a bigger problem than Lisp's syntax, though.
It's not easy to produce a language with a syntax that's good as daily use syntax, but is also not unwieldy as an AST. Lisp is one of the few relatively successful examples.
- AnimalMuppet 2y ago> The syntax was a bigger problem than Lisp's syntax, though. Yeah. XML and S expressions are pretty close to functionally equivalent. But once you've seen S expressions, XML is disgustingly clumsy.
- nine_k 2y agoSGML was intended for sparse markup in mostly plaintext files. From it grew HTML that is markup-heavy, and XML which is often 100% markup. What made sense for rare markup nodes became... suboptimal when applied in a very different role.
- jll29 2y ago1. GML => SGML => XML 2. rm * 3. JSON 4. rm -rf /
- pfdietz 2y ago"Any data can be turned into Big Data by encoding it in XML."
- fuzztester 2y agoWow. Also: XML: eXtremely Murky Language or Mindblowing
- chubot 2y agoThey have a different model -- one is better for documents, and one is better for programs/data XML and HTML are attributed text, while S-expressions are more like a homogeneous tree If you have more text than metadata, then they are more natural than S-expressions e.g. The closing </p> may seem redundant, until you have big paragraphs of free form text, which you generally don't in programs
- apex_sloth 2y agoThanks for this little flashback to when I had to write XSLT for apache cocoon as my student job
- pmarreck 2y agoI don't know how many other languages use it but I've long admired Elixir's approach to giving devs access to the AST using its basic types in order to write macros: https://hexdocs.pm/elixir/macros.html https://hexdocs.pm/elixir/macros.html It is certainly possible to implement this sort of thing in other languages, I think, depending on the compilation or preprocessing setup
- medo-bear 2y agoPossible doesnt mean "requires same ammount of effort"
- pmarreck 2y agoThat's fair. I think it's a big win, though. Macros, when the situation calls for it, are amazing. For example, I believe most of the UTF8 handling code in Elixir was done via macros which brought down the amount of code that had to be maintained by quite a bit.
- pjmlp 2y agoFor a while that is how I made my Website dynamic, by writing everything in XML and linking XSLT stylesheets, however the future ended up not being XHTML, and eventually I rewrote those stylesheets in PHP. Doesn't win any price, or content worth of "I rewrote X in Y" blogpost, but does the job.