Slashdot Mirror


Perl 5.8.1 RC1 Released

moksliukas writes "Perl 5.8.1 RC1 has been released. A major change is that due to security reasons, the "random ordering" of hashes has been made even more random. As always, there are other numerous changes, including some improved utf-8 handling support, deprecation of 5.005 style threads, $* magic variable, pseudo-hashes and a number of other improvements. As usual, perldelta summarises all changes."

18 comments

  1. Perl6 is a mistake by keesh · · Score: 0, Troll
    I've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby as well, and I intend to move my department over to it instead of wasting time with Perl 6.

    One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).

    The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.

    Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.

    On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?

    I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.

    Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD^H^H^H^H Perl is dying.

    1. Re:Perl6 is a mistake by Cecil · · Score: 3, Insightful

      (and not one with loads of irritating whitespace thank you very much).

      Ok, have you actually tried python?

      My responses to your responses:

      No -- The whitespace is hardly irritating. It makes the code readable and clear. It's beautiful. I thought it would be a pain at first until I realized that "Hey, all python's doing is enforcing (and interpreting) the way I already write my code, and the way that code should generally be written IMHO.

      Yes -- And you still think it's irritating whitespace? If you're one of the people who tries to fit too many things onto one line, and don't include whitespace to make it clear what the hell you're doing, those are the sort of people who should be forced to use python. ;)

    2. Re:Perl6 is a mistake by togofspookware · · Score: 2, Insightful

      > Recently I've started using Ruby as well

      Yeah. Ruby's awesome. Cleaner than Python and easier to write than Perl, IMO. But how do I use SSL? :-o!

      > The whole thing is an exercise in
      > pseudo-computer science masturbation
      > with little real purpose

      Which is exactly the reason I'm going to love it :-D

      > (and not one with loads of irritating
      > whitespace thank you very much)

      I didn't like that much, either, but I found that a bigger issue, for me, was that I was constanly having to read the reference guide to figure out which module to import to do something really simple. Also the inconsistancies (sp?) in naming bugged me. Sometimes things are capitalized, sometimes not, sometimes with underscores, sometimes without... is it spelled "HTTPRequest", "HttpRequest", or "http_request"? mmm. depends on the module. gotta get the reference out...

      I actually tried using Python a couple times, but never got the hang of it. As oppoesed to Ruby which I picked up right away and have been using ever since.

      --
      Duct tape, XML, democracy: Not doing the job? Use more.
    3. Re:Perl6 is a mistake by Anonymous Coward · · Score: 2, Interesting

      no the whitespace is great. the poster above is obviously a troll but personally I could never dig python's object model, or the scoping rules, last time I checked them out. I could never remember what was a method and what was a builtin. And making lambda functions was goofy (no closurers).

      I think this all is being fixed but I was turned off by the "work in progress" feel that Python had. It's like Guido had a few good ideas and hammered them into a language without thinking it through.

      Ruby on the other hand was like a breath of fresh air. The fact everything is an object instantly frees up needed brain cells to remember other things.

      Just an idea. If you're a "I hate Perl" fanatic, don't blindly choose Python as your "new favorite language", give Ruby a try.

      I'm saying this mostly because I REALLY wish Ruby had a nice collection of add-ons the way Perl does, and the more people are interested, the more will write cool modules and I won't have to grudgingly return to Perl for my projects.

      Also, the poster above is WRONG about the regular expressions in Perl 6. We NEED a new regex syntax desperately. I'm tired of writing '(?:foo|bar)' when something like '[foo|bar]' or '(foo|bar)' would be clearer. Unfortunately all the other languages picked up this crap as "perl-style regexps".

      I also wish Perl6 would allow folks to define their own regexp metacharacters, there are tons of cool unicode characters to use.... my co-workers would kill me but fuck 'em and their unicode-ignorant computers. :-)

    4. Re:Perl6 is a mistake by scrytch · · Score: 1

      > Ok, have you actually tried python?

      Honestly, do python apologists cut and paste this argument every time they see it? I use python, I hated the whitespace thing, I got used to it. But this still irks the hell out of me. It might help to get out of the damn bunker and stop "defending" this Pure And Beautiful Thing Of Absolute Perfection That Is Beyond All Question against the unwashed hordes that don't appreciate its wonderful elegance and all that rot. "you're one of the people who blahblahblah can't write clean code blahblahblah protects you from yourself blahblahblah" ... patronizing gets you nowhere.

      Trying to understand the people you're evangalizing to can go a long way.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    5. Re:Perl6 is a mistake by Anonymous Coward · · Score: 0

      just because this is slashdot doesn't mean you have to dupe and dupe everything

    6. Re:Perl6 is a mistake by dkf · · Score: 1
      Also, the poster above is WRONG about the regular expressions in Perl 6. We NEED a new regex syntax desperately. I'm tired of writing '(?:foo|bar)' when something like '[foo|bar]' or '(foo|bar)' would be clearer. Unfortunately all the other languages picked up this crap as "perl-style regexps".
      The problem is that REs do so many things that a normal US keyboard doesn't have enough printable characters on it to describe them all simply. (Your example replacements are already used for other things - character sets and capturing sub-REs respectively.) OK, there are other matching bracket pairs in the UNICODE character sets, but people'd scream blue murder if they had to type them into their scripts in most locales...

      Of course, I don't favour Perl, Python or Ruby...

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  2. ...and "upgrading" will be a headache by tibike77 · · Score: 2, Interesting
    ...for some.

    Quoting from their "delta":
    Incompatible Changes:
    Hash Randomisation (The added randomness may affect applications[...])
    Unsafe signals again available(from safe to unsafe then back to safe then back again and so on and so forth until your head explodes)

    ...and that's just quoting *some* small portion of it...
    Makes you wonder "why bother upgrading when they'll change it back again in a few and I'll have to re-check my code"...
    --
    By reading this signature you agree to not disagree with the post you just read.
    1. Re:...and "upgrading" will be a headache by Hard_Code · · Score: 3, Insightful

      I didn't read the whole changelog, but I did read those two sections. Applications will only break if they relied on specific random ordering ACCROSS EXECUTIONS. E.g., if you dumped the contents of a hash into a file on two runs, and then compared, you may now get different ordering on identical data, whereas before you would (coincidentally) get the same random ordering and there would be no difference between the files. You probably shouldn't have been relying on this to begin with.

      --

      It's 10 PM. Do you know if you're un-American?
    2. Re:...and "upgrading" will be a headache by Piquan · · Score: 1

      Applications will only break if they relied on specific random ordering ACCROSS EXECUTIONS. E.g., if you dumped the contents of a hash into a file on two runs, and then compared, you may now get different ordering on identical data, whereas before you would (coincidentally) get the same random ordering and there would be no difference between the files. You probably shouldn't have been relying on this to begin with.

      Actually, I was. I have one test suite for a system, in which I make a "reference run" that gets dumped to a file. Then I make changes, or adjust timings, and so forth, then repeat the reference run to make sure there's no regressions. I can't hardcode many of the results in the test suite, since they depend on a database that is changing daily (or more frequently).

  3. I'm not new to Perl by CausticWindow · · Score: 0, Offtopic

    But from the responses here I can tell that a lot of people care about it.

    --
    How small a thought it takes to fill a whole life
  4. maybe sort the hash? [nt] by tlhf · · Score: 1

    yada, no text, ...