[Melbourne-pm] April 14 Perl Mongers Meeting!

Daniel Pittman daniel at rimspace.net
Tue Apr 13 18:38:55 PDT 2010


Toby Corkindale <toby.corkindale at strategicdata.com.au> writes:
> On 14/04/10 00:31, Patrick Donelan wrote:
>>     It's just a small change, but the one I'm looking forward to the most
>>     is finally getting rid of 'use strict' and 'use warnings' on 5.12.
>>
>>
>> Only strictures, not warnings I think?
>>
>> Adam would have a hernia <http://use.perl.org/~Alias/journal/40302> if
>> they enabled warnings by default..
>
> Meh, sounds like he is blaming warnings when maybe he should be looking at
> fixing the way his applications log to disk.

Well, to some degree.  Some of the strictness and warnings bits are too prone
to false-positives, and those suck.

> Although I take his point about the confusion of working out just when
> warnings *are* enabled, now that assorted other modules (he mentions Moose,
> Mojo and Dancer) enable them for you.  Which is why it will be best if
> there's a perl-core kind of way to do it.

*nod*

> I'd like to see strict and warnings on by default, because of the number of
> times I've fixed up a friend or colleague's code that doesn't work - and it
> was for an obvious reason, yet they weren't running with strictures or
> warnings and so didn't get told by the interpreter.

I am in favour of most of strict and some of warnings by default; a few bits
of 'strict refs' like the '@{ $foo || [] }' noise I could live without,
since I don't think they add substantial value, but other parts like magic
call-by-name stuff I am happy to see remain.

> If you're an expert, then you can do 'no strict/warnings' where necessary,
> but generally I think they should start on.
>
> I realise I'm probably in the minority here though..

I think you are spot-on: being able to tell the system "lemme do it anyway",
but providing more safety and, essentially, coddling to developers is a good
thing.

After all: computers are *good* at repetitive, boring tasks like checking if
you misuse a variable, or typed in the wrong name, or whatever.  People are
absolutely, without question, *not* any good at that.

So, let us pay the computer to do that hard work and warn us.

        Daniel

I would actually like more static warnings and errors out of Perl, so that
I could get compile-time warnings about calls to unknown functions — and the
option to disable those in the rare cases that code does dynamically extend
the symbol table with new code at runtime.
-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons


More information about the Melbourne-pm mailing list