5 ms·
The only thing I don't like about Perl, is that it's a dynamic language and therefore unsuitable for large (as in, significantly longer than will fit on the scr
by tbrownaw 12y ago
The only thing I don't like about Perl, is that it's a dynamic language and therefore unsuitable for large (as in, significantly longer than will fit on the screen at one time) programs. But "use strict;" helps with that, and apparently more recent versions (work has 5.8.8) allow subroutines to more easily declare a specific number of arguments.
I'm actually learning more of it right now, so I can clean up and modularize some of my scripts. Because my other options (ksh93, Progress 4GL, and maybe older versions of Java or C++) are even less suitable.
- kbenson 12y agoIf you haven't already, I highly suggest looking on metacpan.org for modules, and searching for highly rated[1] and recent ones. Things like Path::Tiny[2], Try::Tiny[3] and Function::Parameters[4] can make a huge difference in productivity and readability. Task::Kensho[5] is also useful for getting a good base set of medern modules to choose from for many tasks. 1: https://metacpan.org/favorite/leaderboard https://metacpan.org/favorite/leaderboard 2: https://metacpan.org/release/Path-Tiny https://metacpan.org/release/Path-Tiny 3: https://metacpan.org/release/Try-Tiny https://metacpan.org/release/Try-Tiny 4: https://metacpan.org/pod/Function::Parameters https://metacpan.org/pod/Function::Parameters 5: https://metacpan.org/pod/Task::Kensho https://metacpan.org/pod/Task::Kensho
- tbrownaw 12y agoI'll take a look at these, thanks. :)
- muraiki 12y agoIf you planned on using objects, you can consider using Moo for roles to allow composition, and combining it with Types::Tiny for type validation. There's also Params::Validate for plain functions. The validation is unfortunately at runtime, but at least you get a clear error instead of unanticipated behavior. Moo (and it's bigger parent, Moose) can really help you structure your application better using roles. https://metacpan.org/pod/Moo https://metacpan.org/pod/Moo https://metacpan.org/pod/Type::Tiny https://metacpan.org/pod/Type::Tiny Edit: Don't use Params::Validate; kbenson's recommendation for Function::Parameters looks awesome!
- eCa 12y agoThere is also Kavorka[1] as an alternative to Function::Parameters, which can use Type::Tiny types in signatures. The next step after that is Moops[2]... [1] https://metacpan.org/pod/Kavorka https://metacpan.org/pod/Kavorka [2] https://metacpan.org/pod/Moops https://metacpan.org/pod/Moops
- kstrauser 12y agoI've written Python systems several tens of thousands of lines long. I don't think dynamicity has anything at all to do with a language's suitability for large projects (but if it did, I'd lean toward it making maintenance easier).
- Pamar 12y ago@tbrownaw... Do you mix Perl and Progress 4GL? Care to get in touch?
- tbrownaw 12y agoA little bit, yes. Contact info is in my profile now.
- b2gills 12y agoYou may be able to get them to update to at least 5.18.0 if you tell them about CVE 2013-1667 and all the mitigations added to 5.18.0 to prevent them. https://duckduckgo.com/?q=CVE+2013-1667&ia=about https://duckduckgo.com/?q=CVE+2013-1667&ia=about http://blog.booking.com/hardening-perls-hash-function.html http://blog.booking.com/hardening-perls-hash-function.html I would also recommend reading "Modern Perl" which is made available for free by the publisher/author at http://modernperlbooks.com/ http://modernperlbooks.com/ ( Also there are large codebases written in Perl ( I beleive booking.com is an example ) I also recommend installing the Perl you are using outside of the system directories. You may also find Pinto and https://Stratopan.com https://Stratopan.com useful for managing your dependancies. Which is especially useful if you make your codebase modular.