Arc Forumnew | comments | leaders | submitlogin
6 points by eds 5894 days ago | link | parent

But if you don't get the standard library right, then everyone is going to start using their personal version of it, and then you lose portability, etc.

It is worth getting the language right, even if the fix is trivial.



3 points by almkglor 5893 days ago | link

I was actually thinking some time ago about using something like this:

  (mac mapeach (var coll . body)
    "Like 'map, but with 'each syntax"
    `(map1 (fn (,var) ,@body) ,coll))

  (marcup
    `(html
       (head (title ,(+ page-title " - My Website")))
       (body
         (.content
           ,(enformat page-content))
         (.sidebar
           ,@(mapeach (link dest) weblinks
               `(.sidelink (a href= ,dest ,link)))))))
Basically 'marcup would accept a list representing an abstract syntax tree for the HTML code to be generated.

Then I decided to implement w/html instead, which was almost as good ^^; >.< In fact it's arguably better, since the copious ' marks denote non-Arc code (i.e. HTML tags), as opposed to the marcup style above where , marks denote Arc code.

-----