Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

(Ovid) Re: Thoughts on Perl6 - Love it? Hate it?

by Ovid (Cardinal)
on Jan 10, 2002 at 20:45 UTC ( #137756=note: print w/ replies, xml ) Need Help??


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.


Comment on (Ovid) Re: Thoughts on Perl6 - Love it? Hate it?
Select or Download Code
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://137756]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-07-29 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls