Bugzilla:Languages: Difference between revisions

Line 59: Line 59:
=== Cons ===
=== Cons ===


See [http://avatraxiom.livejournal.com/58084.html The Problems of Perl].
* See [http://avatraxiom.livejournal.com/58084.html The Problems of Perl].
* In addition, certain syntax things are confusing for new users:
** The difference between () and [].
** The fact that %var is a () (which is also the array notation) but {} is $var.
** The fact that subroutine arguments aren't really subroutine arguments, they're just an array that gets passed to a function.
** The fact that $hash{'key'} and $hash{key} are the same.
** qq[] is a string (as is qq{}, etc.), q[] is a string, though qw() is an array.
** &sub() is resolved at runtime but sub() is resolved at compile time, ''except'' for methods.
** The conversions from one type to another can sometimes be horrendous to read. Eg: [keys %{ @{ $var } }].
** $$foo[1] and $foo->[1] mean the same thing.
** That numbers are compared with "==" but strings are compared with "eq", even though in other places strings are interpreted as numbers if used numerically.
** 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.
** That Perl errors are in $@ but system errors are in $!, and when to use which one.
** That Perl doesn't really have a class system, it just has a package system with @ISA or "use base," "bless," and SUPER::.


== Perl6 ==
== Perl6 ==
canmove, Confirmed users
345

edits