Arc Forumnew | comments | leaders | submitlogin
3 points by kinnard 2937 days ago | link | parent

VS SML? https://github.com/arclanguage/anarki/blob/master/lib/sml.ar...


3 points by rocketnia 2935 days ago | link

I can't speak for jazzdev, but I bet the code in sml.arc is just meant to be a more convenient way to generate XML from Arc.

  ; SXML
  (tagname (@ (attr "value") (attr2 "value2"))
    (tagname2)
    (tagname3 "data"))
  
  ; sml.arc's "old format"
  (tagname (@ attr "value" attr2 "value2")
    (tagname2)
    (tagname3 "data"))
  
  ; sml.arc's current example
  (tagname attr "value" attr2 "value2"
    (tagname2)
    (tagname3 "data"))
Meanwhile, Racket's batteries-included tools go their own way (http://docs.racket-lang.org/pollen/second-tutorial.html?q=x-...):

  ; X-expressions
  (tagname ((attr "value") (attr2 "value2"))
    (tagname2)
    (tagname3 "data"))
Several Racket libraries are tagged "sxml," but I wonder which formats they use exactly.

As for SXML, I think it's pretty nice that the SXML standard actually has well-defined ways to use doctypes, namespaces, processing instructions, and comments. That makes it more capable of representing an actual XML document. The spec is only a few pages long, and half of that is preamble, so it would be pretty simple to implement it faithfully.

All in all, I think I'd like to write code in a style like sml.arc, but then normalize it to something like SXML.

-----