Slashdot Mirror


Apocalypse 2

Larry Wall has written the second article in his "Apocalypse" series about Perl6. If you missed the first article, you might want to read that one first, or see the previous discussion.

6 of 94 comments (clear)

  1. *more* contexts? Is Perl's use of context good? by Paul+Crowley · · Score: 4
    I love Perl in lots of ways, it really is the language that rolls its sleeves up and gets the job done, but the first thing I'd take out if I had a free hand is the entire distinction between scalar and array contexts. As Perl is moving closer to a pure OO way of thinking, it becomes more attractive to make the distinction explicit, by using different names for "foo in scalar context" and "foo in array context".

    However, it seems that Perl 6 will extend the concept of "context" still further!

    Proposal 1 is ``that a hash in scalar context evaluate to the number of keys in the hash.'' (You can find that out now, but only by using the keys() function in scalar context.) Proposal 1 is okay by me if we change ``scalar context'' to ``numeric context'', since in scalar context a hash will produce a reference to the hash, which just happens to numify to the number of entries.

    So now you can get the wrong thing by expecting a number but accidentally creating a scalar rather than numeric context! You've got to have a new operator, presumably numeric(), to sit next to scalar()!

    Will there be a context for every type, built-in and dynmically created, in Perl? Or will the contexts remain a weird wart on the type system?

    I don't know what the right solution is, since Perl 6 would barely be Perl at all without the contexts, but moving away from contexts at least would be good.

    I could be wrong here. I'm writing this mainly because for the most part I love Perl, and I'd be interested in being persuaded that context is a good thing and worht the potential for confusion, that it's better to have a distinction between

    my $line = <FILE>;
    my @wholething = <FILE>;

    than having

    my $line = FILE.line();
    my @wholething = FILE.lines();

    I think I'm intellectually inclined to feel that Python does most things the right way, but somehow I still find myself reaching for Perl when I need to get the job done...
    --
  2. Programs written in Unicode? by Jeffrey+Baker · · Score: 4
    Larry says that the programs can be written in Unicode. Wow. If I am reading that properly, then this would be a valid Perl 6 program:

    my $¾ = 0.75;

  3. better off understanding ancient Mandarin by selectspec · · Score: 4
    Look I love Perl, but everytime I focus on the semmantics of the language, I find myslef utterly confused. Mainly, because I am lazy, but also, because I like an artificial world were there is only one way to do something (like C or Java). With perl, there are an infinite number of ways to do the same thing, and they all look syntacticly different. Understanding perl is like pooring over ancient manuscripts in different languages. My guess in the distant future our descendants will see Perl as this cryptic cult of demon worshipers or something. Some archeologist will spend his whole life trying to unearth the complexities, only to one day to yell out, "My God! Its so simple!"

    Perl. Can't live with it, Can't live without it.

    --

    Someone you trust is one of us.

  4. My request for Perl6 by lupetto · · Score: 5

    Here is my one and only request for perl6:

    When running the 'Configure' script, make the questions a little more difficult. This will effectively weed out serious sysadmins and programmers from the newbies.

    The perl6 configure script should keep track of the answers to their questions, and grade them on how many questions they've got correct.

    Don't know which version of malloc to use??
    Do you want to use vfork()? You sure?
    NO PERL6 FOR YOU!!

    Come on people, if you don't even know the size of the byte boundy on a double, how are you supposed to understand something like:

    if ( /DECLSPEC.*\s\**([^\s\(]+)\(/ ) {

    Post the users name and email address on a public web site and let others view it. Email the results to their family, friends, and employers! Have a special list for those who ctrl-c before it's finished, call it the "chicken" list.

  5. Larry Wall ownz j00! by vsync64 · · Score: 5
    I have to chuckle a little bit at the title of this series, and the fact that Larry Wall actually knows what the word "apocalypse" is. I'm not a big fan of Perl, myself, but I have to say that Larry Wall is one of the most interesting and insightful people to show up in the arena for some time.

    As a Christian, I have to say it's nice that people like Larry are out there to show we're not all stupid bumbling loonies (it's just Sturgeon's Law cropping up again, you know). If you've read any of his writings, especially his "State of the Onion" addresses, you'll see that he manages to present his thoughts and beliefs in a humorous and intelligent way.

    Secondly, I really like the way he manages to make analogies between things. The first year he used sounds, the second year he used pictures, and the third year he used smells. And somehow he ends up with a grand scheme that addresses theology, science, computers, and, of course, Perl.

    I think this is great, not just because the subject matter is interesting, but because to be any good at programming, you have to be able to map between different systems. The good ones don't seem to be as focused on depth (although they certainly can be; no one can argue that Knuth isn't good, and he's way hardcore) but on breadth of experience. The more different systems you experience, the more you can abstract the particular thing you have to be working on and actually transcend the implementation language and platform. (Or at least that's what I tell myself, being permanently scatterbrained and distractable :)

    Anyway, I don't know how to keep this from sounding hopelessly fanboyish, but ummm Larry Wall is cool and learning new stuff is cool, and I recommend that everybody go read his stuff and then go play with something you've never tried before. Exploration is the One True Way to have fun with computers again.

    --

    --
    TO BUY A NEW CAR WOULD MAKE YOU SEXUALLY ATTRACTIVE.
  6. The Perl6 answer could be ... Ruby by Waffle+Iron · · Score: 5
    Perl has been my favorite language for some time now, even with all its warts. I've been keeping tabs on Perl6 stuff and thinking about how Perl could be improved. I finally surfed over to the Ruby site to check it out, since I heard that it was an attempt at a "better" Perl.

    After playing with it for a while, I think it could be my new favorite language. My Ruby programs usually come out even more concise than Perl, but just as clean looking as Python.

    Ruby needs more library support and some optimization work (I usually get about 4X slower than Perl), but I think that is an extremely promising contender in this space.