in reply to Re^7: Why Perl 6 is taking so !@#$ long
in thread Why Perl 6 is taking so !@#$ long

What does intuition have to do with computers?

  • Comment on Re^8: Why Perl 6 is taking so !@#$ long

Replies are listed 'Best First'.
Re^9: Why Perl 6 is taking so !@#$ long
by shotgunefx (Parson) on Feb 28, 2006 at 09:43 UTC
    Not sure if there is a little sarcasm in that message or not, but I'll assume there isn't.

    I would say it has nothing to do with computers, and much to do with programming languages, or at least Perl. Obviously, a large part of Perl's attraction is DWIM, which to me implies intuition, at least to a point.

    Not knowing that "err" is "defined OR", my first thought would be that it had something to do with exceptions. The definition of the word implies that it has something to do with errors.

    While expressions in programming languages and human languages often don't match up, they more often do. "do, if, else, and, or, etc, not, while, use, etc".

    Seems like it should have been more appropriately named defor, dor, whatever.


    -Lee
    "To be civilized is to deny one's nature."

      And maybe a defined or specifically for hashes, doh (which again is getting back into error-related-sounding-words territory :).

      Update: Not to be confused with D::oh, of course. :)

        Well it's certainly less so than "err". Suprisingly, not everyone is a Simpsons fan.

        -Lee
        "To be civilized is to deny one's nature."
      Not knowing that "err" is "defined OR", my first thought would be that it had something to do with exceptions. The definition of the word implies that it has something to do with errors.

      It sounds like your intuition is working just fine to me. Isn't that how err will be used? Isn't that how or is used now? (And since or is slightly wrong, err is introduced to pay attention to definedness rather than truth)

      BTW, what does your intuition tell you about //? And why? Intuition comes from experience and is specific to the tool you're using. A C++ programmer would intuit that // introduces a comment. A Perl programmer has no such intuition. A Perl programmer might think it has something to do with the other doubled-character operators, &&, and || (or just be confused and have to look it up :).

        Something being undefined is not necessarily an error. More along the lines of false, not wrong IMHO.

        I think // is a bit different. I did come from a C/C++ background and it's use made it fairly obvious that it wasn't a comment. Err binds a bit tighter in the way that most people think.The fact that 69 distributions on CPAN currently define a sub named err should say something.

        -Lee
        "To be civilized is to deny one's nature."
        And that's why I suggested that err be made into a very local try/CATCH block. It keeps the same mnemonics (deals with the "error" produced by the LHS), but does so in an actually exception oriented way.
Re^9: Why Perl 6 is taking so !@#$ long
by demerphq (Chancellor) on Feb 28, 2006 at 09:31 UTC

    IMO a fair amount. You wouldn't want to name a routine that sums a list 'avg' would you? Naming something that has nothing to do with errors 'err' is IMO a bad plan. And clashes with expectations generated by other languages. (Such as VB which uses the err object for exception throwing.)

    I said all this on p5p at the time, but to no avail.

    ---
    $world=~s/war/peace/g