in reply to Re: Perl6 syntax being too much complex? How we will teach and read that?!
in thread Perl6 syntax being too much complex? How we will teach and read that?!
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Perl6 syntax being too much complex? How we will teach and read that?!
by BrowserUk (Patriarch) on Mar 23, 2004 at 03:08 UTC | |
by Aristotle (Chancellor) on Mar 24, 2004 at 17:56 UTC | |
by BrowserUk (Patriarch) on Mar 24, 2004 at 18:47 UTC | |
by TimToady (Parson) on Mar 25, 2004 at 03:26 UTC | |
by BrowserUk (Patriarch) on Mar 25, 2004 at 07:51 UTC | |
| |
by Aristotle (Chancellor) on Mar 25, 2004 at 03:48 UTC |