Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Favorite Perl 6 feature?

by zby (Vicar)
on Apr 11, 2003 at 09:12 UTC ( #249836=perlmeditation: print w/replies, xml ) Need Help??

There is that new Synopsis and I am sure every monk has allready read all the other Apocalipses, Exegeses and Synopses and has lots of interesting thoughts about them. The discussions in the developers lists are a bit 'core' and hard to follow and for some time there was not general Perl 6 discussion here. Perhaps it is time for a new one. So what is the feature that makes you so excited waiting for P6?

Some links to previous discussions I've collected for you: Thoughts on Perl6 - Love it? Hate it?, Poor Man's Perl6 Exegesis (you get what you pay for), Perl 6 and Scoping, perl 6, Wanted: Perl 6 Programmers, Perl6 Quick Reference, Perl6 Grammars, NO PERL 6, Perl 6 Involvement

Replies are listed 'Best First'.
Re: Favorite Perl 6 feature?
by mirod (Canon) on Apr 11, 2003 at 09:25 UTC

    My favourites:

    • the entire new regexp system, which will allow us to write grammars directly in the language,
    • the type system, which will most likely allow us to reduce the amount of memory used by Perl when needed,
    • wrappers around subroutines (along with temporization), will make testing much easier, it will be possible to write stubs for existing functions,
    • "cute" feature I like the most: the "pipe operator" (==> and <==),
    • and of course Parrot is great idea, I want to be able to use the best ruby/python/brainfuck libraries (OK, maybe not brainfuck ;--)
      That's pretty much like me. In the regexp I like that 'closure' property - that you can call code from regexp and the other way. And as for cute operators I like the vector operators. For the last point about Parrot - well Perl libraries are I think the bigest so I believe it will be much more the other way around - ruby/python/brainfuck programmers using Perl libraries.

        Regexps are already closures via the ??{ construct. You just can't jump back into regexp because the engine isn't re-entrant (though I hear it works a bit - I seem to fall over all the nasty bits). What I'm really pining for are:

        • Grammars for binary data (P::RD chokes)
        • Being able to locally redefine the language
        • Getting full access to the VM and in a meaningful way since perl5's VM is so clunky to work with
        • Junctions!
        • Lazy pipelining
        • Co-routines

        And I want these not because they're cool but because at various points I could have made my own code simpler, more efficient or had some otherwise significant improvement.

Re: Favorite Perl 6 feature?
by kal (Hermit) on Apr 11, 2003 at 09:23 UTC

    I really like all the new grammar stuff. Being able to write real parsers without having to actually write the parser is going to be great fun. I even heard that it would be possible to write a proper XML parser in pure Perl that would be reasonably quick and efficient, although I'm not sure what values of 'efficient' they were thinking about.

    I think my favourite feature, though, is going to not be a language feature at all, but the profile of Perl itself. Perl6 will look a lot more modern a language to Perl5, which has a few crusty idiosyncrasies that we've learned to live with. I'm really hoping that Perl6 will bring new people to the language who may not have otherwise looked at it, and yet still be the Perl we all know and love.

    The one feature I want to see in Perl6, which I'm not sure is there yet, would be a really easy way to distribute modules (possibly as Parrot bytecode?). CPAN is great, but I'm thinking more along the lines of what PAR is doing - being able to install cool modules (like Class::DBI ;) on your ISP's hosting environment by FTP, for example, would be amazing.

      Well, you will be able to write parsers in perl 6. But will that be "real" parsers, as in "fast"? Because I got the impression it's basically a mixture of perl5 regexes and Parse::RecDescent. Now don't get me wrong, recursive descent parsing is powerfull. But it's also dead slow, because there's hardly any room for optimization. It just comes down to: try all rules in order, backtrack as much as needed. Powerfull, but slow.

      Real parsers use LL(1), LR(1) or similar grammars, where looking ahead a fixed, small amount of symbols will determine which rule to apply with no need for backtracking if the rule fails.


        I don't plan to write parser for real huge languages, just to be able to write small-but-complete parsers for any input language my code needs. An XPAth parser for exemple usually does not process large input, or a simplified interface that emits SQL queries, or a simple expression evaluator. For all of those needs the current regexps are not quite powerful enough, and writing the interpreter using Parse::RecDescent or YAPP is sometimes not justified. Especially as using native regexps will make it more acceptable for whomever has to maintain the code.

        So for most of the needs I have, the speed of the parser is not a problem, I just like the fact that I will be able to write cleaner and more powerfull "very-little language" interpreters directly within my code.

        Well, I think your point is actually quite a general one in a way - there is a lot of stuff that seems to be going in because people might find it useful, rather than addressing something specifically wrong at the moment (although the majority does appear to be addressing actual, practical problems). However, people like TheDamian and Larry seem to have a knack of leading us the right direction..

        I think it's right to have a level of skepticism about the development of Perl6, though, to keep them honest. It would be quite easy, I imagine, to go completely into cloud cuckoo land. The parsers are a good example - they could be very very powerful, but if they're too slow to use, then they won't be useful. Speed, of course, will be a big issue I think in all areas, because I think that's where the Parrot people think they're going to get wins. It will be interesting to see if it lives up to the current expectations :)

Re: Favorite Perl 6 feature?
by ignatz (Vicar) on Apr 11, 2003 at 17:51 UTC
    • Parrot
    • Cleaning up OO
    Everything else is gravy.
Re: Favorite Perl 6 feature?
by broquaint (Abbot) on Apr 11, 2003 at 09:59 UTC
    I'd have to to say let, that new funky new hypothetical operator bound to be abused in many a way (checkout Whatif for a kind of preview in perl5).

    Oh, and being able to load bf libraries should be pretty nifty too.


Re: Favorite Perl 6 feature?
by Abigail-II (Bishop) on Apr 11, 2003 at 09:25 UTC
    Well, I'm not at all excited about Perl6. I still doubt it's going to be worth all the work that's put in, and I've to see whether it ever will get an acceptable speed.

    It's hard to pick a favourite thing. Most new things I don't care about, and I mourn the loss of some things. My favourite thing is probably the Pythonish way of dealing with subroutine parameters.


      Well, I'm not at all excited about Perl6.

      Bah humbug! Come on scrooge, get in the spirit of things. Perl 6 is going to kick some serious ass, it might even be as good as Python! Better yet, we get Parrot, so I can compile my Python, Ruby, and Perl 6 code to Parrot bytecode! Then I can compile the Parrot bytecode to an executable! World peace can't be that far behind!

      whether it ever will get an acceptable speed.

      This is Perl, speed doesn't matter. If I wanted speed I'd write in ASM! I want rapid development, I want portability, I want all things Perly. Gimmie Gimmie Gimmie!

      Besides, they'll be workarounds for all speed problems - if a feature is too slow just don't use it (you don't use the pre-match and post-match variables, do you? - I can't even remember what they are!). And that's not even that much of a concern because, just like food, everything ends up the same in the end.

      Most new things I don't care about

      Yeah, what do us real programmers need all these flashy gizmos for? The only language you need is binary. Just give me a keyboard with giant '1' and '0' buttons and I'll be able to whip up anything! Kids these days, sheesh.

      It's hard to pick a favourite thing.

      Atta monk! So many good things it's hard to choose, I know. Kinda like easter, you got those chocolate bunnies, and then those cadbury eggs with that sweet, sweet white and yellow filling. They also have those mini-eggs, have you seen those? Then there's the marshmellow eggs, the malt chocolate ones, and even those caramilk ones. Mmmmmm... Chocolatey Perl goodness...

      and I mourn the loss of some things.

      Do not let your heart be troubled. Go now, and rest, for you are weary with toil and much sorrow. Tonight you shall sleep in peace. Tomorrow you shall rise and see that Perl 6 does not mean the end of Perl 5, for much maintenance work will be required for years to come. I also see, in the not so distant future, a light on the horizon. It marks the coming of a Perl 5 - Parrot compiler which shall prove to be the end of your troubles.

      My favourite thing is probably the Pythonish way of dealing with subroutine parameters.

      True Dat. Personally when I saw the Parrot april fools joke I couldn't have been happier (they got me goood). I still think a Perl-Python merger would bring balance to the force, but unfortunately few seek comprimise.

      Anyhow, I have a strange craving for cadbury mini-eggs, I'll see you all later.

        Oh foolish monk, you omitted to log in before posting. Now I don't know who to thank for brightening my day :-)

Re: Favorite Perl 6 feature?
by adrianh (Chancellor) on Apr 12, 2003 at 23:08 UTC

    My favorite feature would have to be the clean up of the OO layer. It's going to make my life a lot easier.

    I'm also looking forward to:

    • Parrot - because I like multi-language programming.
    • PRE/POST/wrap - because they look like they will let me write design-by-contract code easily.
    • macros - because domain specific languages rock and source filters are evil.
    • the type system - I like compile time errors. I like the code to document itself.
    • function "style" - things like lazy lists and simple currying making it easier for me to code in a functional style if I want.
    • it still looks like perl5 - I can still write a quick'n'dirty script if I need to.

    Actually, I'm looking forward to pretty much everything I've heard about perl6 ;-)

Re: Favorite Perl 6 feature?
by neilwatson (Priest) on Apr 11, 2003 at 17:42 UTC
    I am looking forward to seeing Perl 6 in action. No features in particular. I can tell you what feature my wife is least looking forward to. She is most displeased with the idea of me replacing my existing library of Perl books!

    Neil Watson

      Maybe you should let her know about Safari. You can change your bookshelf every month without it costing you anything above the small subscription fee. You can then join my quest to bring more Science books (particularly Wiley ones) to Safari. Then I can die happy.

Re: Favorite Perl 6 feature?
by hangareighteen (Monk) on Apr 12, 2003 at 02:53 UTC
    Honestly, what I'm really looking forward to is seeing perl6 versions of some of the modules I use today. POE should be really fun, and slightly more interesting if perl6 shows up with some sort of event structure built in. I'm fond of HTML::Mason and I'd like to see how they come out of this. Of course, I really want to see a perl6 mod_perl running with Apache2.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://249836]
Approved by broquaint
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2023-12-03 08:24 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (20 votes). Check out past polls.