http://www.perlmonks.org?node_id=137756


in reply to Thoughts on Perl6 - Love it? Hate it?

I know that a lot of people are nervous about Perl 6, but they shouldn't be. Yeah, there is talk about co-routines, curried functions and things like that, but that's going to make the language more powerful. Interestingly, even though many features are going to be added to the language, it's going to be even easier to use.

Some things I like:

The variable prefix notation will be based on the variable type and not on the access method:

@foo[ $bar ]; # was $foo[ $bar ]; %foo{ $bar }; # was $foo{ $bar };

Programmers routinely get those wrong when they're first starting with Perl. Now they'll get them right.

More compiler hints and optional strong typing! This is going to overcome one of the biggest objections to Perl!

my int @array; my INT @next_array;

While this has not been nailed down, the first example above hints to the compiler that you will mostly be using integers in the array, so the compiler will optimize for it. However, you can stick the occassional string in there.

The second example tells the compiler that there will only be integers in the array. This will likely throw an exception (maybe at runtime?)

How about lexically scoped subroutines? Now, you'll be able to have truly private methods and ensure that they are only called as methods. No more letting people call methods as subroutines and getting things screwed up.

Access to your caller's lexically scoped variables through a MY pseudo-namespace. While I'm not sure about this, it does mean that you'll be able to do exports to your caller's lexical scope without globals. Yay :)

Parrot will be separate from Perl and we should have the ability to program directly in it for runtime benefits. In fact, if the work on byte-code compilers comes to pass, we'll be able to write Java applets in Perl. Look out Java, here we come :)

There's a lot more, but that's all I can think of off the top of my head and I need to get to work. The only real downside I see to Perl 6 is that it likely won't be out until late 2003 or 2004 :(

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Replies are listed 'Best First'.
Re: (Ovid) Re: Thoughts on Perl6 - Love it? Hate it?
by impossiblerobot (Deacon) on Jan 11, 2002 at 00:27 UTC
    I fear Perl 6, as I fear all things new. :-)

    The variable prefix notation will be based on the variable type and not on the access method:
    @foo[ $bar ]; # was $foo[ $bar ]; %foo{ $bar }; # was $foo{ $bar };
    Programmers routinely get those wrong when they're first starting with Perl. Now they'll get them right.
    I won't get it right (at least for a while). I bought into the whole idea that the prefix showed what variable type is being accessed (though it does get a little fuzzy when dealing with references). It may help new Perl programmers, though.

    More compiler hints and optional strong typing! This is going to overcome one of the biggest objections to Perl!
    And add one of my strongest objections to virtually every other language but Perl. I realize that it will be optional, but so (in theory, at least) is 'use strict'.

    Actually, I'm looking forward to Perl 6. I've always hated the arrow syntax for Perl's object-oriented features, and I'm willing to give up the '.' concatenation operator to get rid of it. :-)

    Impossible Robot
Re^2: Thoughts on Perl6 - Love it? Hate it?
by Anonymous Monk on Mar 30, 2015 at 23:41 UTC
    "I know that a lot of people are nervous about Perl 6, but they shouldn't be. ... The only real downside I see to Perl 6 is that it likely won't be out until late 2003 or 2004."

    Because 13 years later, they still won't have to worry about it. Here we are in 2015. But why worry about when Perl 6 is going to finally someday be released? We have changed so much as an industry in the past 13 years. I myself have had ZERO need for the features that Perl 6 would have provided over this decade, instead I find the need for continuous delivery. Git, Jenkins, perlbrew, vagrant, AWS ... these are the tools of the future.