Bugzilla Talk:Languages: Difference between revisions

Jump to navigation Jump to search
Line 1: Line 1:
== On Perl5 cons ==
== On Perl5 cons ==
* Perl 5.10 will have many new features (like even faster and better regexps, C3 method resolution for multiple inheritance).


""I think everyone agrees that Perl5 is difficult for large, maintainable applications, and no one wants to advocate continuing to use it. ""
""I think everyone agrees that Perl5 is difficult for large, maintainable applications, and no one wants to advocate continuing to use it. ""
Line 23: Line 25:
**** No it's just you and a couple of others ;) - ajt
**** No it's just you and a couple of others ;) - ajt
* You can't make subroutines private in a class.
* You can't make subroutines private in a class.
** Any method that starts with '_' is considered private. Or use Moose.
** Not true:
** Not true:
  package Foo;
  package Foo;
Line 51: Line 54:
** 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 sepatates operators, and it creates problems for inexpirienced programmers (thay 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 will have named captures.
*** Perl 5.10 will have named captures.
Line 62: Line 66:
** In array context, $cgi->param('value') returns an ''empty list'' if "value" wasn't passed to the CGI. It doesn't return undef. This is why we have "scalar $cgi->param()" all over the code.
** In array context, $cgi->param('value') returns an ''empty list'' if "value" wasn't passed to the CGI. It doesn't return undef. This is why we have "scalar $cgi->param()" all over the code.
*** Sorry, poor programming in your code not perl.
*** Sorry, poor programming in your code not perl.
*** Any Perl framework will have other methods


== On Python cons ==
== On Python cons ==
15

edits

Navigation menu