[PRL] don't

Dave Herman dherman at ccs.neu.edu
Wed Nov 11 08:42:29 EST 2009


They think they're pretty special:

     http://www.reddit.com/r/programming/comments/a26fe/dont/

We can (kind of) do this, too:

     (define-syntax (don stx)
       (syntax-case stx ()
         [(don (q t) . _)
          (and (eq? (syntax->datum #'q) 'quote)
               (eq? (syntax->datum #'t) 't))
          #'(void)]
         [_ #'"Hi, I'm Don."]))

     > (don't (display "hello, world"))
     > (don't (delete-file "/etc/passwd"))
     > (don't (exit))

And *my* version even comes with a bonus Don:

     > don
     "Hi, I'm Don."

Dave




More information about the PRL mailing list