Re: use common::sense;by moritz (Cardinal)
|on Nov 04, 2009 at 08:50 UTC||Need Help??|
First of all I like the idea of heaving the meta data in JSON instead of YAML. The YAML thing didn't allow full YAML, but only a certain subset (of which I don't know if it is well-defined), and it's a rather complicated standard.
OTOH JSON is simple, easy to parse and totally sufficient for what we need for the meta data.
About the module itself: There are various policy modules these days, for example Modern::Perl. I have mixed feelings about them:
For one I understand the desire to write less boilerplate code, but on the other hand it's more stuff to install, more things to remember when reading the code (does Modern::Perl enable strict refs? what about common::sense? Why not both?)
Oh, and I don't like the name. common::sense sounds presumptuous to me.
If one of those policy modules turns out to be widely adopted, that will be less of a problem though.
But all in all these policy modules show me one thing: Perl 5 as a language doesn't follow the needs of application developers close enough. It can't, because it has to preserve backwards compatibility. It is turning from a programming language into a programming platform, where policy modules, OO frameworks (Moose) and other modules shape the language.
This can be seen either as bolting on, or as a proof for Perl's flexibility - it's probably both.
In terms of language evolvement I see Perl 5's future in being a programming platform - programming language feels a bit like a dead end.
Update: I also think that policy modules should document their target group very clearly. For example common::sense excludes some strictness and some warnings, which makes me think it's not intended for the novice, but rather for the experienced Perl programmer. Still it would be nice to see that in the documentation.