Hi,

I'm pleased to announce GuileScript 0.2.0. This version supports macros and
changes a few function names to make them more schemy (similar to
BiwaScheme). Because of how macro expansion works in Guile (it's done while
producing Tree-IL), GuileScript gets macro support for free (I just needed
to avoid printing the macro definitions to JavaScript).

https://github.com/aconchillo/guilescript

So, this:

(define-syntax gs-when
  (syntax-rules ()
    ((gs-when condition exp ...)
     (if condition
         (begin exp ...)))))

(gs-when #t
  (console-log "hey ho")
  (console-log "let's go"))

converts to this:

(function () {
  if (true) {
    console.log("hey ho");
    return console.log("let's go");
  }
})();

Hopefully I have time to add more features soon. Happy hacking!

Aleix

Reply via email to