Slashdot Mirror


Exegesis 3 Released (Perl 6 Examples)

chromatic writes "On the heels of Larry's most recent revelation, the mad scientist of Perl (Damian Conway) has followed up with Exegesis 3. His article gives working Perl 6 code examples of Larry's design decisions." Lots of good stuff in here.

6 of 85 comments (clear)

  1. man by Anonymous Coward · · Score: 2, Insightful

    I really used to like perl i thought it was great...

    But now that i have been using C++ alot and really learned the in's and out's of the language, perl code really looks kinda nasty.

    Yick. I never thought i'd become one of those perl is messy and crusty and ugly types, but looking at that code, blech.

    So now they're gonna start using non-ascii characters in the code? Oh that's a joy, like i really wanna have to look up how to make greek characters in text editors.

    They blew it, perl 5 was acceptable and pretty useable. Perl 6 just looks silly.

    If i have to resort to using a scripting language for something in the future i definatly will avoid perl, especially perl 6.

    Perl really is a hacked together mess.

    Cool hack, but not cool to actually use for something important.

  2. Some thoughts by reynaert · · Score: 4, Insightful

    Some of this new stuff seems to be seriously blurring the difference between language and library.

    Of course it's cool to write something like @costs, but why must be an operator? It seems to me it would work just as well as an ordinary procedure.

    I'm wondering if they are thinking about constructs to define new syntax at runtime. In Scheme for example most of the syntactic forms are defined in the library using define-syntax .

    1. Re:Some thoughts by scrytch · · Score: 5, Insightful

      Some of this new stuff seems to be seriously blurring the difference between language and library

      Bingo. Perl has very malleable syntax, which is perhaps not as flexible as, say, SML, but still has had a philosophy of letting you rewrite good chunks of perl in perl. Perl6 is just adding to the potential confusion, letting you write code as twisted and evil as you want to. Besides, if you tend to write mathematical apps commonly ... well, you might not write them in perl, but you probably do at least " on an easy key (I had to copy and paste it myself). " does not need to be an operator. It just can be.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    2. Re:Some thoughts by scrytch · · Score: 3, Insightful

      Bah, piece of crap turned my sigma characters into something else entirely. My guess is unicode input box, non-unicode form processing... I think the mainframe world is chuckling at us now, they dealt with EBCDIC dialect conversion issues on a daily basis decades ago...

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  3. Perl6 multiway comparison requires telepathy by dha · · Score: 3, Insightful
    On the one hand, Exegesis 3 tells us that in Perl 6,
    100 < -s $filepath <= 1e6
    is essentially equivalent to:
    (100 < -s $filepath) && (-s $filepath <= 1e6)
    except that the `-s $filepath' only gets evaluated once. We're supposed to be Wow! Neat! about that.

    On the other hand, we are also told:

    Did you notice that cunning $a == $b != NaN test in operator:EQ? This lovely Perl 6 idiom solves the problem of numerical comparisons between non-numeric strings.
    which may be cunning, except of course with wow neat multiway comparisons it is equivalent to ($a == $b) && ($b != NaN), which doesn't do the advertised job.

    Finally, lest we might suspect operators like < and <= are treated differently from == and != for purposes of this `feature', we are told:

    binary <, >, lt, gt, ==, !=, etc. become chainable

    Predict the ultimate (though probably not imminent) demise of multiway comparisons in Perl 6.

  4. Re:wow, perl meets apl by Dr.+Awktagon · · Score: 3, Insightful

    I'd like to see something like this:

    @diffs = map { $1 - $2 } @list1, @list2
    That makes sense to me at first glance..or maybe better something like this:
    @diffs = map { $_[0] - $_[1] } @list1, @list2
    which would be like taking one element from each list and passing them to the "subroutine" in the block. Anything would make more sense than ^- !