The power of toggle
I don't know if we've been missing out on deliberate API lovin' or that we're becoming dumber every minute because of too much work, or its just the love month?
...but we've been missing the power of "toggle".
Toggle is [defined][1] as:
any instruction that works first one way and then the other; it turns something on the first time it is used and then turns it off the next time
Needless to say, toggle is very efficient for use with boolean values (defined by either true or false). Of course you might think its easy to implement, but this is an explicit example to illustrate on saving database reads and writes. Aside from that, you'll write a more elegant code. ![]()





