OK! Be concrete  !  :-) ( Hart wie Beton !)
As Ruby and Python are getting more and more attraction [1][2] I think
they do something right, that Perl doesn't.
What I think where both (especially Python) do better is in readable code.

What makes Perl hard to read is the excessive use of special characters
(/\W/).
(/\W/)
It is in Ruby the same. In Python re.search('\W',foo). Is it really nicer ?

In my opinion, reducing the use of those characters would make Perl a
lot easier to read and also easier to write.
Global variables with cryptic names, that no beginner can make any sense
of by reading it. And after not working with "$<" for some months I
can't remember it either, although I've got quite some Perl experience.

In Perl6:  $*UID   (see S02.pod)
Additionally I'm not a friend of sigils: Typing them is relatively
painful, for reading there is no advantage if you use an editor with
decent syntax highlighting and the code looks more cryptic. The answer
in Perl6 are twigils, great... One step backwards in my optinion.
Most programming languages
/C(++|#)?|Java(Script)?|Python|Ruby|Groovy/... don't need them. The only
obvious advantage of using sigils is variable interpolation in strings.
But that could easily be done only in strings without the need to put a
$ in front of each and every variable name in the rest of the code.

Perl is a language with sigils. We must see it more penetrating ! The advantages of sigils in Perl are overall, by item access in structures, by the flexibility of subroutine calls, interpolation , global variables, .... Perl wants separate variables from other language structures . Perl without sigils is not Perl more. Perl6 in this regards is really to late for you :-)
I would also like semicolons to be optional. There are far more cases of
single line statements than multiline statements. So you would save
quite some characters, when the semicolon would be optional and you
could concatenate multiline statements with e.g. a backslash.

Some say that there are too much operators in Perl(6). I partially
agree. I don't like the implicit type casting forced by the operators
(== int / eq string). That's harder to learn and remember. Harder to
read also.
Operators are only another format ( nice ) of functions.
I really like the Python way of doing it: Set the variables type on the
  assignment and remember it. The (fewer) operators now work according to
the type of the operands. No implicit (and error prone) type casting.
That way seems to be the best compromise of easiness and type safety.
I could continue on that, but I've already written too much...
"use warnings" is helping you !

And you can always make explicit type conversion. That does mean explicit :-) . But you must type something more. The only builtin implicit type casting in Perl is this numeric / string conversion and it is fairly obvious and absolutely not error-prone.

[1] http://radar.oreilly.com/archives/2007/05/state_of_the_co_6.html
[2] http://www.google.com/trends?q=perl%2C+python+-snake%2C+ruby

These reports are fairly special. These are not about popularity of a programming language , but how many books O'Reilly sold, and how many were googled. What about is not clear. Maybe waiting for Perl6 ?
In place of contributing? Searching for redemption ?
People not only want code that _is_ sexy, but they also want it to
_look_ sexy.
Sex is oftentimes perversion ;-) Well, natural selection. Survives the fittest idea , not necessarily the sexiest look.

Tibor

Reply via email to