Minimum character literal toggle

Sometimes during dev there is a toggle that I want to turn on or off in the code very quickly.

For example

(def reset-database false) ; a toggle I set between invokes   
                           ; of reset of reloadedworkflow,  
                           ; depending on whether I want an 
                           ; empty db or continue dev against same db

Recently I wondered what would be the most minimal toggle, typing wise. Here it is

(def reset-database ''nil) ; two quotes=on, one quote = off

So whats left is now down to only remove or add a single quote. Enjoy :slight_smile:


I am in eager anticipation of your upcoming book, “Clojure for Perl programmers”!


I use a keyboard shortcut to toggle between false and true (and other word collections). See:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.