IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I had a nice response to this typed up
And then I visited [link|http://www.msnbc.msn.com/id/6205119/|http://www.msnbc.msn.com/id/6205119/] and Galeon locked up on me. Gah.

So you're getting the really short version.

Some things are just plain different. For instance method calls are . rather than ->, you write %foo{$bar} rather than $foo{$bar}, a few operators changed, etc. Most of the changes make the language less surprising for people who are learning it.

Perl regular expressions now have facilities for flexibly capturing lots of information about the match. You also can build them up from small pieces. This has all been carefully designed so that you can write something that looks a lot like a BNF grammar and you'll get a regular expression that actually parses that grammar. (It is only a recursive descent parser though.) These complex regular expressions are known as (surprise, surprise) grammars.

Perl 6's grammar will be a Perl 6 grammar. This grammar will be available to play with, and can be overridden on the fly (this is the upside of a recursive descent parser - you can play these games). This is expected to replace the games that (some) people play today with source filters.

There are many small improvements. For instance:
\n# multi-way comparisons now work\nif (1 < $x < 10) {\n  ...\n}\n\n# Sometimes you don't need parens where you once did.\nif 1 < $x < 10 {\n  ...\n}\n\n# I used it, but didn't point out that this is the\n# "TBD" operator.  It is legal Perl but throws an\n# exception if it executes.\n...\n\n# The print here syntax has some new tricks.\n       print <<EOT;\n           And we write some text here  using the\n         "print here" syntax.  Note that leading\n         whitespace will be stripped to the  EOT\n         marker, letting us maintain code indentation\n         but easily output a block of text that isn't\n         indented.\n         EOT\n\n# Pipelines let us write code top to bottom where\n# previously it was bottom to top.  Compare a\n# Schwartzian transform in Perl 5:\nmy @shortest_first                     # 5\n  = map { $_->[0] }                    # 4\n    sort { $a->[1] <=> $b->[1] }       # 3\n    map { [ $_, $_->height ] }         # 2\n    @animals;                          # 1\n# with one in Perl 6:\n@animals                               # 1\n  ==> map { [ $_, .height ] }          # 2\n  ==> sort { $^a[1] <=> $^b[1] }       # 3\n  ==> map { $_[0] }                    # 4\n  ==> my @shortest_first;              # 5\n\n# Junctions let you write code like this:\nif any(@these) > all(@those) {\n  print "These have the largest element\\n";\n}\n

Perl 6 has a much richer object system. It adds lots of goodies for those who like functional programming. Named arguments to functions. And a swarm of smaller improvements.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Many thanks for that
It was the really short version that I wanted :-)

[Obsequious note: you're getting (noticeably, over the past 18 months or so) very good at this sort of thing - *fawn*]


Peter
[link|http://www.debian.org|Shill For Hire]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Blog]
     Perl frustrations - (tuberculosis) - (45)
         Simple solution - (ben_tilly) - (10)
             Bleh. - (admin) - (3)
                 That's because you approached it wrong - (ben_tilly) - (2)
                     I'm gradually warming up to it - (deSitter)
                     That should be in the man page. - (static)
             Is this a sort of typecasting? - (tuberculosis) - (2)
                 It's a reference -NT - (Simon_Jester)
                 Sort of - (ben_tilly)
             Interesting.... - (Simon_Jester) - (2)
                 The solution would have its own problems - (ben_tilly) - (1)
                     <bow> thank you. -NT - (Simon_Jester)
         THank you for stepping on this rake - (Arkadiy) - (33)
             He was overcomplicating it - (ben_tilly) - (32)
                 Well, maybe - (tuberculosis) - (17)
                     Agreed - (ben_tilly) - (16)
                         Agree its a mistake - (tuberculosis) - (15)
                             Same here. - (admin)
                             Right - (ben_tilly)
                             Shame about the inertia. Python's design is "least surprise" - (FuManChu) - (12)
                                 When I started with Perl... - (ben_tilly) - (11)
                                     On Perl 6 - (pwhysall) - (3)
                                         Re: On Perl 6 - (Yendor)
                                         I had a nice response to this typed up - (ben_tilly) - (1)
                                             Many thanks for that - (pwhysall)
                                     We're having a little brown bag on Ruby - (tuberculosis) - (4)
                                         Re: We're having a little brown bag on Ruby - (JimWeirich) - (3)
                                             Shhh! Anonymous Todd works at some other... - (CRConrad)
                                             I might have been there - (tuberculosis) - (1)
                                                 Re: I might have been there - (JimWeirich)
                                     Re: strict -- have you seen pychecker? - (FuManChu) - (1)
                                         No I hadn't, thanks - (ben_tilly)
                 BTW Arkadiy, I'm still waiting for a response - (ben_tilly) - (13)
                     I am not saying it's shorter in C... - (Arkadiy) - (10)
                         And now for my real comment - (ben_tilly) - (2)
                             May be it's a hindsight thing - (Arkadiy) - (1)
                                 It could be many things - (ben_tilly)
                         I don't know - multimap - (Simon_Jester) - (6)
                             Re: I don't know - multimap - (Arkadiy) - (5)
                                 Why the worry about efficiency? - (ben_tilly) - (4)
                                     I worry about efficiency - (Arkadiy) - (1)
                                         Ah - (ben_tilly)
                                     C vs Perl - efficiency - untrue for me - (broomberg) - (1)
                                         Point - but you may want to rebenchmark - (ben_tilly)
                     Here's a smalltalk version - (tuberculosis) - (1)
                         Yes, think of a reference as a pointer - (ben_tilly)

You idiot! WE'RE the People's Front of Judea!
57 ms