15
edits
(Correct version of TIOBE: http://lui.arbingersys.com/index.html) |
|||
| Line 14: | Line 14: | ||
* Apparently Max's contributions are sancrosanct because even if they are debunked, incorrect, entirely subjective or just plain trolling they can't be removed from the wiki page itself on penalty of locking the page and throwing toys out of the pram. - Aaron | * Apparently Max's contributions are sancrosanct because even if they are debunked, incorrect, entirely subjective or just plain trolling they can't be removed from the wiki page itself on penalty of locking the page and throwing toys out of the pram. - Aaron | ||
* Perl 5.10 | * Perl 5.10 has many new features (like even faster and better regexps, C3 method resolution for multiple inheritance, named captures). | ||
* Class::C3 supports C3 method resolution for Perl 5.6 (looked into cpantesters results, and it works in 5.6 too), 5.8 and 5.10. | * Class::C3 supports C3 method resolution for Perl 5.6 (looked into cpantesters results, and it works in 5.6 too), 5.8 and 5.10. | ||
* Perl is stable. Anything written for Perl 5.8 should work in Perl 5.10. Perl development version are automatically tested on different OS and by testing CPAN modules on them. | * Perl is stable. Anything written for Perl 5.8 should work in Perl 5.10. Perl development version are automatically tested on different OS and by testing CPAN modules on them. | ||
| Line 26: | Line 26: | ||
** one source of language usage stats: http://www.cs.berkeley.edu/~flab/languages.html - stat of SourceForge | ** one source of language usage stats: http://www.cs.berkeley.edu/~flab/languages.html - stat of SourceForge | ||
*** Perl has other big place for software - CPAN, so no need to store them on SF or other places. If you would add CPAN, that stat would be different for Perl. | *** Perl has other big place for software - CPAN, so no need to store them on SF or other places. If you would add CPAN, that stat would be different for Perl. | ||
** TIOBE | ** In TIOBE JavaScript is less popular than Delphi. It is caused by too simple queries to search engines (only "Perl programming"). Look at this page, it has more complex query (second graph): http://lui.arbingersys.com/index.html . Not it looks much more real for JavaScript. And for Perl too. | ||
** Catalyst is a recently new project (first | ** Also this page about usage stats for Perl: http://www.perlfoundation.org/perl5/index.cgi?usage_statistics | ||
** Catalyst is a recently new project (first release at the beginning of 2005) | |||
* Certain syntax things are confusing for new users | * Certain syntax things are confusing for new users | ||
| Line 38: | Line 39: | ||
**** There are signatures for limited checking, but it's best to validate parameters properly (plenty of ways to do this from very simple to very powerful on CPAN or manually) instead of just assuming that because something is 'a string' that it's ok. -ajt | **** There are signatures for limited checking, but it's best to validate parameters properly (plenty of ways to do this from very simple to very powerful on CPAN or manually) instead of just assuming that because something is 'a string' that it's ok. -ajt | ||
**** See for example the 'autobox' module on CPAN (http://search.cpan.org/dist/autobox) that allows you to call $foo->isa('Class') on any scalar. -phaylon | **** See for example the 'autobox' module on CPAN (http://search.cpan.org/dist/autobox) that allows you to call $foo->isa('Class') on any scalar. -phaylon | ||
**** Attribute::Signature on CPAN | |||
** Some parameter check is available. Or use Moose, it can check even better that many languages can. | ** Some parameter check is available. Or use Moose, it can check even better that many languages can. | ||
*** See for e.g. http://search.cpan.org/perldoc?MooseX::Params::Validate -mst | *** See for e.g. http://search.cpan.org/perldoc?MooseX::Params::Validate -mst | ||
| Line 79: | Line 81: | ||
** That numbers are compared with "==" but strings are compared with "eq", even though in other places strings are interpreted as numbers if used numerically. | ** That numbers are compared with "==" but strings are compared with "eq", even though in other places strings are interpreted as numbers if used numerically. | ||
*** that's because humans use numbers as numbers sometimes and words at others - Perl reflects actual use, and this has never been a problem for me - it allows you to compare and sort correctly based on your needs/ | *** that's because humans use numbers as numbers sometimes and words at others - Perl reflects actual use, and this has never been a problem for me - it allows you to compare and sort correctly based on your needs/ | ||
*** PHP doesn't have | *** PHP doesn't have separate operators, and it creates problems for inexperienced programmers (they do not use ===, strval, intval). | ||
** Figuring out what's $1, $2, $3, etc. from a regex result. And the fact that $1 and $2 don't get reset if there's no match. | ** Figuring out what's $1, $2, $3, etc. from a regex result. And the fact that $1 and $2 don't get reset if there's no match. | ||
*** Perl 5.10 has named captures. | |||
*** my ($first, $second) = ($var =~ m/(foo)(bar)/); is preferred syntax unless you're emulating awk. Or stuck in perl 4. -mst | *** my ($first, $second) = ($var =~ m/(foo)(bar)/); is preferred syntax unless you're emulating awk. Or stuck in perl 4. -mst | ||
*** figuring out $1, etc is trivial | *** figuring out $1, etc is trivial | ||
** That Perl errors are in $@ but system errors are in $!, and when to use which one. | ** That Perl errors are in $@ but system errors are in $!, and when to use which one. | ||
edits