[plt-scheme] ajax and plt
On Jul 2, Dave Gurnell wrote:
> [...]
> To my knowledge, neither of these libraries compile actual Scheme into
> Javascript, but they both have a parenthetic syntax for writing
> Javascript code. So, for example, in Mirrors you can do stuff like this:
>
> (js (alert ,(string-append "Hello " "world"))
>
> I use Mirrors with jQuery quite a lot;
>
> (js (!dot ($ "#mybutton")
> (click (function () (alert "Hi")))))
I'm curious -- is there any advantage for this over something like:
(let ([msg "Hello world"])
@js{alert(@msg)})
(Random example, since using `string-append' is even more boring in
this style.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!