[racket] editing racket code effectively

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Tue Nov 15 21:18:47 EST 2011

David Vanderson wrote at 11/15/2011 09:04 PM:
> And if I want to disable the printf, put "#;" in front:
> (if (integer? 1)
>     (begin #;(printf "calling bar") (bar))
>     (baz))
> Is that how you would do it?

Pretty much, although my habits are from before "#;", I usually have 
more line breaks, and I like "log-debug", so it would probably be:

(if (integer? 1)
     (begin ;; (log-debug "calling bar")

Another thing I have done sometimes, in code of a few complicated 
layered modules, is to have per-module debugging-message macros, which 
let me enabled/disable debugging messages on a per-module basis, at run 
time.  So some "log-debug" would never be commented-out, but would be 
disabled by default.


Posted on the users mailing list.