2013-01-02

I think I just experienced a bracing/indent style shift within my mind.

And may the sweet Lord have mercy on me.

So I'm swapping back and forth between demonstration code and my own analogous code trying to figure out a bug on my side. As I swapped back and forth I thought to myself, "Clean looking example code always gets crowded and less readable once converted to actual-use code." Then I realized the particular code paragraph on my side that triggered this thought was just a cut-n-paste of the demo code. Uh oh.

So I swapped back and forth a few more times and realized the problem. I use K&R style and the example code uses Allman style. Oh, boy. Maybe, I'm tired or getting too old, but that initial brace all by itself sure looks cleaner to me right now.

I didn't mean to sin. I mean no disrespect to the zealots of my order, but I think I may have just been converted.

No comments:

Post a Comment