1
edit
Aarontrevena (talk | contribs) |
(Add On Perl5 cons) |
||
| Line 1: | Line 1: | ||
== On | == On Perl5 cons == | ||
I think everyone agrees that Perl5 is difficult for large, maintainable applications, and no one wants to advocate continuing to use it. But still, there's some red herrings: | |||
* Certain syntax things are confusing for new users | |||
** Granted. But it seems that there would be a strong expectation that anyone programming in a particular language would be far beyond the "new user" stage before they attempted anything big/maintainable/etc -- regardless of the language being used. | |||
* Perl doesn't check the type of arguments to subroutines. | |||
** Given that it's a typeless language, what is there to check? | |||
* <tt>$$foo[1]</tt> and <tt>$foo->[1]</tt> mean the same thing. | |||
** This is analogous to a C/C++ construct where <tt>ix->member</tt> and <tt>(*ix).member</tt> mean the same thing. | |||
* You can't make subroutines private in a class. | |||
** Not true: | |||
package Foo; | |||
my $private_method_ref = | |||
sub { | |||
print "hello, I'm a private method\n"; | |||
print "There is no way to call me outside of this package\n"; | |||
}; | |||
sub public_method | |||
{ | |||
# call private method | |||
$private_method_ref->(); | |||
} | |||
edit