Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Clojure vs Racket

Name: Anonymous 2011-01-31 6:28

Is Clojure a better language than Racket?

Name: Doctor Racket !RACKET/.HY 2011-01-31 8:21

>>6,8,10
If you don't know how to write decent macros, please just don't try to.
(define-syntax (aif stx)
  (syntax-case stx ()
    ((~ p t f)
     (with-syntax ((it (datum->syntax stx 'it)))
       #'(let ((it p)) (if it t f))))))


Also,
(define-syntax (with-identifiers stx)
  ((~ stx (ids ...) . body)
   #'(with-syntax ((ids (datum->syntax stx 'ids)) ...) . body)))


>>10
Someone posted a define-macro some time ago.
It appearead to be more powerful than defmacro, it was hygienic and all, and also had syntax-case's pattern matching, but I prefer to just break the hygiene myself.

>>11
#lang r6rs
You're welcome.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List