Hi Kriangkrai,

> It would be great if PicoLisp have "quasi-quotation", so the code
> could be something like:
> (out "t.html"
>    (sxml
>       (let (Clr "#EEE" Cls "xxx")
>          `(html
>             (body (@ style "background-color:" ,Clr)
>                (div (@ class ,Cls)) )))))

There is indeed something simlar, though not on the base of read
macros but of a function ('fill'). You can either write

   (let (Clr "#EEE" Cls "xxx")
            (body (style "background-color:" Clr)
               (div (class Cls)) ) )
         '(Clr Cls) ) )

or use pattern variables (with '@')

   (let (@Clr "#EEE" @Cls "xxx")
            (body (style "background-color:" @Clr)
               (div (class @Cls)) ) ) ) )

But why should this be necessary, if 'html' and such functions
could handle their arguments in the normal way? A real working
example would be

   (load "lib/http.l" "lib/xhtml.l")

   (out "t.html"
      (let (Clr "#EEE"  Cls "xxx")
         (html 0 "Title" "lib.css" (cons "background-color" Clr)
            (<div> Cls
               "Something in the DIV" ) ) ) )

- Alex
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to