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:

1 Like

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

3 Likes

I use a keyboard shortcut to toggle between false and true (and other word collections). See: https://github.com/debug-ito/rotate-text.el