You know, I've thought about this post for several days and I think it is not nearly as 'obfuscated' as I had originally thought.
The shift operator is one we actually us a lot in our work and I got to thinking and wandering how much we used it. That thinking got me curious and I looked back at various test modules we've written to see just how often it does show up (I even wrote a little Perl script to go through our current stock of modules and actually count how many times it shows up...my associates now think I'm totally crazy). It shows up even more than I had remembered.
More importantly, I actually found your very constuct in one of our modules. It had a bunch of parentheses around to try to 'make it clearer'...it actually now looks much more obfuscated that your more eye-pleasing construct.
Out of curiosity about how my more seasoned test module programmers would see your construct, I showed a couple of them your construct and the one in our code (neither of them was the author of our version). Both of them said (I paraphrase) "Wow! Much cleaner!"
So I would have to back off from thinking yours was 'obfuscated.' Depending upon one's perspective and needs I can see how one might say your construct could be perceived as 'obfuscated' (certainly I did at first); I wouldn't begin to argue...I'm not that experienced. But I, for one, have revised my opinion in those terms.
But independent of whether one sees your beautiful construct that you put forth, it still remains very beautiful to me.
In reply to Re^3: Beautiful code I wrote ;-)
by ack
in thread Beautiful code I wrote ;-)
by Skeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |