Why is perl so productive when compared to those other languages with their simpler syntax?....IMO, the power of perl 5 is that it's complex syntax means that each statement does more, and therefore requires less statements.This is a good question, but I have to disagree with the answer. What makes Perl so darn productive is not the syntax, IMHO, but the semantics. LISP (particularly Common Lisp, and the Zetalisp of the lost and lamented LISP Machine) is the only language I've ever worked in that matched Perl5 in terms of expressive power, yet you can't get much further away from LISP syntax than Perl. But semantically, the two langauges have a lot in common:
These are the qualities (along with numerous others) that make Perl so expressive, so flexible, and, let's face it, so enjoyable to program in. It doesn't matter that we're writing foo(\&subname) or foo(sub { blah; blurfle; }) rather than (foo #'subname) or (foo '(lambda () (blah) (blurfle))). What matters is we didn't have to create a define an interface and create a stupid anonymous class just to pass the function!
As for the syntax of Perl 6, based on what I've seen a little of it is some general tidying up, more of it adds some useful orthogonality (string/integer/boolean, e.g.), but the bulk of it (junctives, >><<, sub vs method vs multi, etc.) is being introduced to support new semantic power. And that has got me seriously jazzed up.
In other words, Perl 5 was design for the programmer, not the compiler.
Amen, brother.
In reply to Re: Re: Perl6 syntax being too much complex? How we will teach and read that?!
by optimist
in thread Perl6 syntax being too much complex? How we will teach and read that?!
by gmpassos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |