From: James Edward Gray II Date: 2009-12-23T02:03:19+09:00 Subject: Re: Symbols vs. constants? On Dec 22, 2009, at 9:02 AM, Marnen Laibow-Koser wrote: > James Edward Gray II wrote: >> >> It's interesting to note that what I just described is pretty much >> standard operating procedure for Perl programmers now. You'll be hard >> pressed to find modern Perl literature that doesn't show warnings turned >> on and avoided in their code. The same is dramatically less common for >> us. This is the one place I feel their culture is superior to ours. >> > > There are two reasons for this. > * Perl warnings are actually useful. I agree that Perl's warnings system is superior. I wish we had the ability to disable specific warnings, as they do. > * Perl programmers don't tend to test systematically. Tests are one tool to help you prevent bugs. There are others, like warnings. A car has more than one feature that helps keep passengers alive in a crash and that's a good thing. There's nothing wrong with using every tool at your disposal. >> The most important aspect to me is libraries though. If you write a >> library that throws warnings, I think we should be able to take your >> keyboard away. It's the whole second-hand smoke thing. You didn't just >> make a bad choice for you but for me too. > > To me, it looks a little unprofessional, but I'm not going to avoid a > decent library just because it throws warnings. Boy, I sure will, if I have a choice. >> It's also worth noting that it is possible to change a constant without >> a warning. In fact, it's possible to do all of Ruby's dynamic magic >> without warnings, so you certainly can avoid them if you desire. > > True. But why bother? A warning is not ipso facto a problem. Now I can tell that you didn't really read my message. I gave my reasons. You have your techniques for building robust software, I have mine, and other programmers have theirs. There's nothing wrong with that of course. If code throws warnings, it reduces some of my options. I would rather avoid that when possible. James Edward Gray II