tag:blogger.com,1999:blog-36345871.post703066386380546246..comments2023-07-11T05:39:57.966-07:00Comments on Perl Alchemy - notes of a programmer: 'use strict' and cargo cult programmingzbyhttp://www.blogger.com/profile/04636763782334128869noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-36345871.post-46725136644427309352011-11-21T04:05:43.705-08:002011-11-21T04:05:43.705-08:00use Modern::Perl; # instead :)use Modern::Perl; # instead :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-36345871.post-4574217595075620742011-11-20T11:33:01.099-08:002011-11-20T11:33:01.099-08:00Michael: true, but one can strive to be more mjd-l...Michael: true, but one can strive to be more mjd-like :-) On which subject, I found his talk on how to progress (in the same set) quite inspiring.<br /><br />In this case, he's quite right that it's bad practice to do something without at least attempting to understand the reason why, and it's even worse practice to pass on advice that you don't understand. I'm ashamed to confess that I didn't really know what "use strict" did before; now I do, and I'll continue to use it mainly because of strict vars.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-36345871.post-2646793424431953492011-11-19T17:14:45.417-08:002011-11-19T17:14:45.417-08:00Both comments above are fantastic.
While it wou...Both comments above are fantastic. <br /><br />While it would be nice to be able to do the same things mjd does, for the same reasons, one must remember "you are not mjd" (for various values of "you").Michael Campbellhttps://www.blogger.com/profile/15025907481819573844noreply@blogger.comtag:blogger.com,1999:blog-36345871.post-4391104590730111422011-11-19T10:10:49.498-08:002011-11-19T10:10:49.498-08:00I think a better metaphor would be the natives see...I think a better metaphor would be the natives seeing the army doctors washing their hands before treating the sick and thinking it was some form of ritual and adopting it. Sure it doesn't do what they think, but it is still good hygiene.<br /><br />It does worry me how few of the people I interview know what strict actually does. The best I have to hope for is some sort of confused statement that it forces them to declare their variables (which is not true, you can fully qualify them and strict won't error).Chas. Owenshttps://www.blogger.com/profile/11716389363199045015noreply@blogger.comtag:blogger.com,1999:blog-36345871.post-68546516676216929142011-11-19T08:15:29.098-08:002011-11-19T08:15:29.098-08:00I'd rather see people blindly "use strict...I'd rather see people blindly "use strict" than blindly leave it out.<br /><br />Of course it would be better if everyone using Perl would understand strict and a lot of other things, but we cannot expect that, can we? Most people just want to get some job done.<br /><br />Nevertheless I think it is important that people understand what strict does and what kind of pitfalls it helps avoid.<br />That's why I started to explain that. so far 2 of the 3 parts were covered: <br /><a href="http://szabgab.com/symbolic-reference-in-perl.html" rel="nofollow">Symbolic references in Perl</a> and <a href="http://szabgab.com/barewords-in-perl.html" rel="nofollow">Barewords in Perl</a>Anonymousnoreply@blogger.com