Slashdot Mirror


Perl 5.22 Released

kthreadd writes: Version 5.22 of the Perl programming language has just been released. A major new feature in this release is the double diamond operator; like the regular diamond operator it allows you to quickly read through files specified on the command line but does this in a much safer way by not evaluating special characters in the file names. Other new features include hexadecimal floating point numbers, improved variable aliasing and a nicer syntax for repetition in list assignment. Also, historical Perl modules CGI.pm and Module::Build are removed from the core distribution.

92 comments

  1. News that matters! by evilrip · · Score: 1

    Finally!@#$% :)

    --
    "To err is human, to forgive, beyond the scope of the Operating System"
    1. Re:News that matters! by plopez · · Score: 4, Funny

      Oblig:

      BEFOREHAND: close door, each window & exit; wait until time;
              open spell book; study; read (spell, $scan, select); tell us;
      write it, print the hex while each watches,
              reverse length, write again;
                            kill spiders, pop them, chop, split, kill them.
                                  unlink arms, shift, wait and listen (listening, wait).
      sort the flock (then, warn "the goats", kill "the sheep");
              kill them, dump qualms, shift moralities,
                            values aside, each one;
                                    die sheep; die (to, reverse the => system
                                                  you accept (reject, respect));
      next step,
              kill next sacrifice, each sacrifice,
                            wait, redo ritual until "all the spirits are pleased";
              do it ("as they say").
      do it(*everyone***must***participate***in***forbidden**s*e*x*).
      return last victim; package body;
              exit crypt (time, times & "half a time") & close it.
                            select (quickly) and warn next victim;
      AFTERWARDS: tell nobody.
              wait, wait until time;
                            wait until next year, next decade;
                                    sleep, sleep, die yourself,
                                                  die @last

      --
      putting the 'B' in LGBTQ+
    2. Re:News that matters! by plopez · · Score: 2

      I forgot the header
      # Black Perl, adapted for Perl 5 by Jonadab.
      # Adapted from Black Perl, as seen in the Camel,
      # 2nd ed., p 553

      --
      putting the 'B' in LGBTQ+
    3. Re:News that matters! by Ed+Avis · · Score: 1

      Sadly this snippet does not work in recent perl versions (I tried 5.18). 'each window' for example now needs to be 'each %window' since hashes must always have the % prefix. (In ancient perl versions the % was added implicitly if not given)

      --
      -- Ed Avis ed@membled.com
  2. First post! by Anonymous Coward · · Score: 1

    Because I wrote it in Perl 6

    1. Re:First post! by Anonymous Coward · · Score: 0

      Because I wrote it in Perl 6

      It's not done yet, I can still read it.

  3. Re:Second post! by bobbied · · Score: 2

    So was it Perl 6 or you that failed?

    --
    "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
  4. Special characters by Anonymous Coward · · Score: 0

    Not evaluating special characters on filenames? What's next, support for long integer arithmetics?

    1. Re:Special characters by preaction · · Score: 1

      bigint has been around for a while. Is that not what you want?

    2. Re:Special characters by dolmen.fr · · Score: 1

      What's next, support for long integer arithmetics?

      perl 5 already has built-in support for 53 bits integers on 32 bits builds (check perl -V:nv_preserves_uv_bits on your platform). If you want more your can use the bigint pragma.

  5. Perl 5.22 Released ... by Anonymous Coward · · Score: 0

    And nothing of value was gained !!! .... /ducks

  6. Impossible to care anymore by Anonymous Coward · · Score: 0

    Perl updates for the past ten years have been mostly unloved features and cruft. If 5.6 didn't get the job done then 5.22 won't either.

    1. Re:Impossible to care anymore by bill_mcgonigle · · Score: 3, Insightful

      Perl updates for the past ten years have been mostly unloved features and cruft. If 5.6 didn't get the job done then 5.22 won't either.

      This is just a "look at me, I'm uninformed about the languages landscape" post (good thing you went AC). Like Perl or not, most people who care about open source development know that the Perl nuts have been busy backporting the ideas that were supposed to show up in Perl 6 to Perl 5.

      Whether or not that goes anywhere is separate from being ignorant about what's going on.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    2. Re:Impossible to care anymore by Anonymous Coward · · Score: 0

      None of those Perl 6 features are particularly remarkable, however. Fuck, pretty much all of the good things from Perl 6 have been offered by Python and Ruby and many other languages for years. The stuff from Perl 6 that they don't support isn't supported because it's shit to begin with.

      We shouldn't be impressed with Perl 5 catching up to where Python, Ruby, and even goddamn Tcl were back in 2002.

    3. Re:Impossible to care anymore by dolmen.fr · · Score: 1

      Perl 5 is still waiting for Python, Ruby to catch up on the Unicode support that Perl had in 2002. And Unicode support in Perl 5 has improved since.
      Perl 6 will even have support for graphemes.

  7. Perl still around? by __aaclcg7560 · · Score: 0

    I though Perl got replaced by Python years ago.

    1. Re:Perl still around? by Anonymous Coward · · Score: 3, Insightful

      I work as a system administrator and although Python is quite popular nowadays I would say Perl is still one of the go-to choices for a lot of sysadmins. Sure Python is doing just fine, a lot of people use it; but I wouldn't say that it has replaced Perl in any way.

    2. Re:Perl still around? by plopez · · Score: 1, Redundant

      Nah.... Python replaced Fortran 77. At least in the significant white space arena.

      Significant white space? Seriously?

      --
      putting the 'B' in LGBTQ+
    3. Re:Perl still around? by prof_robinson · · Score: 5, Informative

      Perl isn't going anywhere. In fact, installs and contributions to CPAN are up almost 1200% in the last 10 years. What's happened to Perl, is it's become ubiquitous...it's literally everywhere. It's not our fault you haven't noticed.

    4. Re:Perl still around? by rduke15 · · Score: 5, Informative

      Replaced where? Apparently not on my Debian servers:

      # find /etc /bin /sbin /usr/bin /usr/sbin -type f | xargs file | grep "Perl script" | wc -l
      119
      # find /etc /bin /sbin /usr/bin /usr/sbin -type f | xargs file | grep "Python script" | wc -l
      29

    5. Re:Perl still around? by Anonymous Coward · · Score: 0

      Isn't Ruby the true heir to Perl, though?

    6. Re:Perl still around? by bill_mcgonigle · · Score: 1

      Isn't Ruby the true heir to Perl, though?

      That was the theory. People got tired of waiting for a fast, memory-efficient runtime. Python is faster, if you have tremendous amounts of memory and can accept the syntax.

      That perl hasn't been supplanted by a better scripting language doesn't say as much about perl as about everything else. There's some scuttlebut that Rust may do that, but it's early days and Mozilla still has plenty of opportunity to destroy it.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    7. Re:Perl still around? by __aaclcg7560 · · Score: 1

      The last time I heard about Perl was in college ten years ago. I was taking Perl because it wasn't Java. The college couldn't afford to renew Microsoft site license for a few years, hence every programming course had every flavor of java: strong, black and hot. Long story short, the Perl class got cancelled.

    8. Re:Perl still around? by Raenex · · Score: 1

      No, Ruby was a fad for hipsters. Python is the true heir.

    9. Re:Perl still around? by Anonymous Coward · · Score: 0

      And with Ruby you don't need a specialized editor to tell me the difference between space and tab characters.

    10. Re:Perl still around? by bobbied · · Score: 1

      Nah.... Python replaced Fortran 77. At least in the significant white space arena.

      Significant white space? Seriously?

      Yea, what's old is new again!

      It was a bad idea the first time folks, although there was justification back then due to restrictions in program size and character sets...

      Stick around, I'm sure we will recycle a LOT of old ideas.... Trick is to line up the new name with the old...

      Cloud Computing == Mainframe

      Etc.. You try a few...

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    11. Re:Perl still around? by plopez · · Score: 2

      In those days they used punch cards so there *was* justification, it was a limitation of technology available at the time. To reintroduce it, 4 years after it was abandoned by Fortran 90, is a serious lapse of good sense. There is no good reason to have it other than as a joke or out of sadism.

      --
      putting the 'B' in LGBTQ+
    12. Re:Perl still around? by Anonymous Coward · · Score: 1

      I though Perl got replaced by Python years ago.

      In the same way that the crappy CGI programs written by crappy (non-)programmers space has been replaced by PHP, yes, Perl has been replaced by Python in many other write-crappy programs by (non-)programmer spaces. But hey, you can brag that objects are part of the language! (even though it's the same object system as Perl).

    13. Re: Perl still around? by Anonymous Coward · · Score: 0

      Or how about don't use tabs at all because it's dumb?

    14. Re:Perl still around? by plopez · · Score: 2

      "Etc.. You try a few..."

      Graph databases = network databases and they sucked then as now
      NoSQL databases = recipe card and network DBs and they sucked then and suck now
      Java VM = UCSD Pascal
      VMs = IBM VM OS
      DevOps = 80's and 90's start ups where you had to do everything.... and it sucked
      Browser = Thin client
      IM = IRC
      XQuery = Heirarchical databases which sucked then and suck now
      OO languiages such as Java are converging on LISP and the LISP family of programming languages vindicating a language approach invented in the 50's and which does not suck.

      That's what immediately comes to mind.

      --
      putting the 'B' in LGBTQ+
    15. Re:Perl still around? by Anonymous Coward · · Score: 0

      Hmm. On mine:
      # find /etc /bin /sbin /usr/bin /usr/sbin -type f | xargs file | grep "Perl script" | wc -l
      108
      # find /etc /bin /sbin /usr/bin /usr/sbin -type f | xargs file | grep "Python script" | wc -l
      180

    16. Re:Perl still around? by prof_robinson · · Score: 0

      That's wonderful - you do realize that Perl is not a Microsoft product, and is free?

    17. Re:Perl still around? by Anonymous Coward · · Score: 0

      That's okay. His degree is in Project Management.

    18. Re:Perl still around? by __aaclcg7560 · · Score: 1

      Actually, computer programming. Project management was what I did before I went back to school.

    19. Re:Perl still around? by __aaclcg7560 · · Score: 1

      The expired Microsoft site license was the reason why every programming course had every flavor of Java. I took Perl because it wasn't Java, but the class got cancelled on the first day for not having enough students. Perl fell off my radar since then. The only reason I picked up Python was because I worked at Google for a while.

    20. Re:Perl still around? by __aaclcg7560 · · Score: 2

      On my FreeNAS file server:

      # find /etc /bin /sbin /usr/bin /usr/sbin -type f | xargs file | grep "Perl script" | wc -l
      2
      # find /etc /bin /sbin /usr/bin /usr/sbin -type f | xargs file | grep "Python script" | wc -l
      2

      Maybe not a fair comparison. :)

    21. Re:Perl still around? by Dog-Cow · · Score: 1

      What kind of hick college gives a degree in computer programming?

    22. Re:Perl still around? by Anonymous Coward · · Score: 0

      Fewer unnecessary pipes, avoiding annoying filename issues between find and xargs (another alternative would be -print0, but using -exec command + is cleaner):

      # find /etc /bin /sbin /usr/bin /usr/sbin -type f -exec file {} + | grep -c "Perl script"

      (169 on my Debian Sid installation.)

    23. Re:Perl still around? by fisted · · Score: 1

      I wrote my sig in perl

    24. Re:Perl still around? by fisted · · Score: 1

      for f in python perl shell script; do printf '%s: %s\n' "$f" "$(find /{,usr/{,pkg/,local/}}*bin -type f -print0 | xargs -0 file | grep -Fi "$f" | wc -l)"; done
      python: 11
      perl: 39
      shell: 260
      script: 314

    25. Re:Perl still around? by fisted · · Score: 1

      the exec + is asking for trouble. exec \; is asking for slow.
      the correct way is, as you mentioned, -print0 | xargs -0

    26. Re:Perl still around? by __aaclcg7560 · · Score: 1

      Community colleges.

    27. Re:Perl still around? by fyngyrz · · Score: 1

      And with Ruby you don't need a specialized editor to tell me the difference between space and tab characters.

      If your editor can't tell you the difference between tabs and spaces, you need a better editor. It's 2015. No need to stick with weak development tools.

      Which is not to say that Ruby isn't a fine language. It is. As is Python 2. And 3.

      --
      I've fallen off your lawn, and I can't get up.
    28. Re:Perl still around? by jbolden · · Score: 1

      @Bill

      Why do you consider Rust to be a scripting language: compiled, no garbage collection... ? I'd consider it more a competitor / modern update to C or Forth than Perl or Ruby. So I'm curious where you are coming from on this.

    29. Re:Perl still around? by shutdown+-p+now · · Score: 1

      OO languiages such as Java are converging on LISP and the LISP family of programming languages vindicating a language approach invented in the 50's and which does not suck.

      In what sense? If you mean first-class functions and the associated techniques and patterns, then this is not at all unique to Lisp. The real distinguishing feature of Lisp is code-as-data and manipulations on it, and mainstream OO languages are definitely not anywhere even close.

    30. Re:Perl still around? by plopez · · Score: 1

      They are headed there. I think it started when reflection became mainstream.

      --
      putting the 'B' in LGBTQ+
  8. hexadecimal floating point numbers? by gimballock · · Score: 2

    What's the use case for hexadecimal floating point numbers? Seems like a "Why not" feature.

    1. Re:hexadecimal floating point numbers? by gameboyhippo · · Score: 1

      That was my thought exactly. I nearly spit out my coffee when I read that wondering if it was some sort of joke.

    2. Re:hexadecimal floating point numbers? by gameboyhippo · · Score: 2

      And the funniest part of this all, is that exponential notation had to be changed to use p rather than e since e is a hexadecimal number.

    3. Re:hexadecimal floating point numbers? by plopez · · Score: 1

      It just those weird and wacky Perl Monks at it again...

      --
      putting the 'B' in LGBTQ+
    4. Re:hexadecimal floating point numbers? by suutar · · Score: 2

      It probably is mostly a "why not". I expect there will be a very few folks who will get some use out of being able to really specify an exact floating point value, though, instead of specifying a decimal float and having it turned into "the IEEE double which is closer than any other to that value".

    5. Re:hexadecimal floating point numbers? by vux984 · · Score: 1

      I expect there will be a very few folks who will get some use out of being able to really specify an exact floating point value, though,

      The folks who needed that have been casting byte arrays to double when they really wanted to set it to a specific bit pattern.

    6. Re:hexadecimal floating point numbers? by gnasher719 · · Score: 4, Informative

      What's the use case for hexadecimal floating point numbers? Seems like a "Why not" feature.

      Useful when you implement high quality transcendental functions and need floating-point constants that are guaranteed to be converted exactly as intended.

    7. Re:hexadecimal floating point numbers? by bobbied · · Score: 2

      What's the use case for hexadecimal floating point numbers? Seems like a "Why not" feature.

      Oh no.. It's for the obfuscated Perl contest.... You can do amazing things with that..

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    8. Re:hexadecimal floating point numbers? by suutar · · Score: 1

      yep. This should be slightly more readable, but it's still definitely a niche feature.

    9. Re:hexadecimal floating point numbers? by UnknownSoldier · · Score: 1

      Guaranteed Precision and Accuracy.

    10. Re:hexadecimal floating point numbers? by Anonymous Coward · · Score: 0

      > What's the use case...?

      Just use your fantasy. Imagine a situation where you don't want the uncertainty brought about by the binary decimal conversions (you can't represent 0.2 in binary without truncation).

      Think, for example, test suites.

      But C3P0, as another poster put it, is a perfectly valid use case too :-)

    11. Re:hexadecimal floating point numbers? by serviscope_minor · · Score: 4, Insightful

      The use of hex floats is to be able to write out floats efficiently and with guaranteed full accuracy to a text file. You can use decimal but you need a LOT of digits in order to do so, making the files rather bloaty. The reason Perl now supports them I suspect is because they're now supported in a bunch of other languages such as C++, so if you want to be able to mutually exchange data, you need hex floats in perl too.

      Pesonally, I like them. A lot of data one generates in numerics isn't exactly human readable, but is generated as text for easy parsing with the original language and other tools. For example if your algorithm generates a log of checkpoints you can restart interrupted computations (great for splitting work into smaller chunks for a cluster), for example. To do that properly, you need to be able to save the state without loss.

      That's just one of many examples.

      It's curious that people (not you) have been guffawing over how stupid Perl is for doing this. It's funny that a supposedly hackish community has a significant cadre who brags about their anti-intellectualism as much as any self-respecting highschooler.

      --
      SJW n. One who posts facts.
    12. Re:hexadecimal floating point numbers? by ThePhilips · · Score: 1

      The perldelta mentions that there were a number of fixes/enhancements to floating point numbers handling implemented.

      I'm not sure why the hex fp (a rather obscure feature) was singled out for the summary.

      --
      All hope abandon ye who enter here.
    13. Re:hexadecimal floating point numbers? by amias · · Score: 1

      while $enlightened
              print 0xMMMMMMMMMMMMMMM

      --
      [site]
  9. Re:Second post! by prof_robinson · · Score: 0

    Neither. Perl6 is completely different than Perl5. Perl6 is almost ready, and will probably co-exist for a while with Perl5.

  10. Re:Second post! by Hognoxious · · Score: 1

    For sufficiently {1940, Germany, Soviet Union} values of co-exist.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  11. use the 4's by Anonymous Coward · · Score: 2, Funny

    $ perl -e 'print 0xC3P0'
    195
    $

  12. lame test message by Anonymous Coward · · Score: 0

    $_ = q^$#%$#%##$%&#$%&&$&$%$%$$#%##$&##$%$$$&#%$%&##%&%##%%^; s#.#chr(ord($&)-35)#eg; s#.{4}# $c = ""; $c .= substr(unpack("B8", substr($&, $_, 1)), 6, 2) for 0 .. 3; pack("B8", $c)#eg; print

  13. Re:Second post! by Raenex · · Score: 1

    Perl6 is almost ready

    Fifteen years in the oven, that better be one tasty cake!

  14. newLISP is the future of Perl by dibos · · Score: 1

    Ruby was built from an insecure and crash-prone mindset. newLISP is like Perl... but readable!

    --
    Robots. Lots of robots.
  15. Re:Second post! by bobbied · · Score: 1

    Perl6 is almost ready

    Fifteen years in the oven, that better be one tasty cake!

    Well.. You KNOW it won't be half baked..

    Yes folks.. I'm here all week and we have no cover... Please tip the waitress..

    --
    "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
  16. Re:Second post! by __aaclcg7560 · · Score: 1

    I had a roommate who left a squash inside a toaster oven on low heat overnight. The next morning I found it. The squash got carbonized (burned) all the way through, blackened and hard as a rock.

  17. How else are you gonna represent a hex value like by Anonymous Coward · · Score: 0

    DEAAAAAAAD.BEEEEEEEEEEEEEF ?

  18. Re:Second post! by fnj · · Score: 0

    Nobody gives a shit about perl6, and nobody ever will. Just call it something else, for god's sake; maybe ivory. Python4 isn't quite the joke that perl6 is, but close to it. Changes in the evolution of a computer language that don't preserve backward compatibility are stupid. C++ got good adoption because the degree to which it was and is not a perfect compatible superset of C is extremely small. The tradeoff was extreme complexity and a profusion of multitudinous ways to do things. Hence the way was opened for ground-up new languages like Java, go, rust, etc, etc.

  19. Re: Second post! by bkgoodman · · Score: 0

    Like Python 3?

  20. Re: Second post! by Anonymous Coward · · Score: 0

    Python 3 is very widely used. Almost all of the major Python libraries support it, many of them having supported it for many years now. The ones that don't often don't support it because equivalent functionality is now part of the Python 3 standard library, or they're archaic libraries that have been supplanted by new competing libraries.

    It helps that Python 3 was actually released (way back in December of 2008!), unlike Perl 6, which continues to be unreleased and useless to this very day!

  21. Re:Second post! by prof_robinson · · Score: 1

    just because *you* don't give a shit, doesn't mean no one else will. And Perl6 was written from the ground up to address all the shortcomings in Perl5, but all the current languages. It's essentially a brand new language, It also uses the Parrot interpreter to do a neat trick; you can mix languages. So Perl6 can use C, Python, etc natively.

  22. What this new release means by Anonymous Coward · · Score: 0

    You know all the ways Perl gave you to do simple things? Well, there are now even more.

    Go nuts!

  23. I wish Perl didn't exist by Anonymous Coward · · Score: 0

    So much

    1. Re:I wish Perl didn't exist by CaptSlaq · · Score: 1

      I think the same about Java.

  24. Re:Perl is for luddites. by fisted · · Score: 1

    Considering this suggestion I'm glad to see that you did improve a bit.

  25. Obligatory by CaptSlaq · · Score: 1

    I'm surprised no one's posted this yet.

    1. Re:Obligatory by PerlPunk · · Score: 1

      I'm surprised no one's posted this yet.

      Actually, I've always been surprised at how reluctant many developers have been to accept regular expressions as a part of their trade. They are very useful shortcuts for string manipulation, and to Perl's credit they defined regex conventions for other languages, like Java and R, to name a couple.

    2. Re:Obligatory by Rich.Miller.6 · · Score: 1

      Or even better, this

    3. Re:Obligatory by dolmen.fr · · Score: 1

      to Perl's credit they defined regex conventions for other languages

      Yes, but the Perl designer also learned from his mistakes (regexp become hard to maintain) to build a new regexp language ("grammars"), both more powerful, more generic and more readable and it's coming in Perl 6.
      http://doc.perl6.org/language/...

  26. 8080 ASM is still sorta relevant too... by Anonymous Coward · · Score: 0

    LOL, Perl. Python is worlds better. Worlds.

    OTOH, if you're still stuck maintaining legacy Perl code, or are neurotically hung up on whitespace issues... you'll just have to keep working harder than would otherwise be necessary. Sorry about that.

    1. Re:8080 ASM is still sorta relevant too... by Anonymous Coward · · Score: 0

      Python may be better than Perl but it is still shit.

      Python blew it when the moron didn't make everything an expression.

      It is full of suck because it had no scoping at all, leading to self self self self(it is not because the moron like explicit, it is because the moron didn't understand scoping).

      Made worse by religious levels of devotion by the morons cult of PEP which leads to ugly code. Bring up a Python flaw and its lemmings will trot out all the idiotic excuses that Guido talks about when defending his shit language.

      Its OO is bolted on shit. Its FP support sucks ass. It really has no excuse for existing.

      Python is pure shit. The language, the libraries, the community, its moron in chief, all of it is shit.

      On the other hand, Guido is slightly more knowledgeable than Rasmus Lerderp so you idiots have that going for you. The average Python "programmer" is not that much more knowledgeable than your average PHP dipshit.

      But at least it isn't Perl

  27. Re: Second post! by fyngyrz · · Score: 1

    Like Python 3?

    Yes. Precisely.

    Python 3.x is not Python 2.x by any means. Python 2 code won't work under Python 3, and safe conversion requires complete re-testing and so is unlikely to be a practical or sane option for many installations, regardless of tools that do it automatically. That's not to say that Python 3 might not be a better language than Python 2; just that it isn't the same language, any more than Ruby or Perl is the same as Python 2.

    But this is one area where open source comes to the rescue. The ability to keep Python 2.x relevant without breaking everything is readily available to anyone who needs it and can afford the investments in time and effort. Python 3 is an option, not a requirement, just as the new version of Perl is.

    --
    I've fallen off your lawn, and I can't get up.
  28. Tab. Now with Aspergerstame. Sweet! by fyngyrz · · Score: 1

    Or how about don't use tabs at all because it's dumb?

    Yes. Much better to type 4 or 8 spaces when you could have just hit tab once. I totally see your point. You bet.

    Can I subscribe to your newsletter?

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Tab. Now with Aspergerstame. Sweet! by Anonymous Coward · · Score: 0

      Or you could just use an IDE, like Aptana Studio, that converts tabs to 4 spaces automatically. Wow that was hard.

    2. Re:Tab. Now with Aspergerstame. Sweet! by weilawei · · Score: 1

      Or you could use VIM, or Emacs, or basically any programmer's text editor in the entire bloody world. Except maybe ed. (Cool story: I once ported ed to win32 for the hell of it. By port, I mean "ripped out every hint of signals or POSIX". It worked, at least, if you can consider ed to be useful...)

  29. Regex? That's my butler's name! by fyngyrz · · Score: 1

    There is an issue of readability that crops up when maintainance is a consideration. Serious regex reads like APL after being put through a shredder.

    I'd rather not use a regex if there's something clearer available:

    myString.find('searchTerm')

    ...and...

    myString.replace('searchTerm','replacementTerm')

    ...and so on.

    On the other hand, when writing my own language (yeah, I know, shut up), one of the very first things I did was incorporate regex handling, so WTF. :)

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Regex? That's my butler's name! by shutdown+-p+now · · Score: 1

      But your examples aren't really particularly different when using regex, at least with a sane library. I mean, in Python, for example, they'd be re.search and re.sub, respectively, but everything else is the same.

  30. Re:Second post! by jbolden · · Score: 1

    I don't know about this idea that no one cares. Perl6 introduces a lot of interesting concepts and techniques, it is very advanced. Perl today is much smaller than Perl was when Perl6 was announced but still larger than Perl was during the days of Perl 4. I don't know whether Perl will make a comeback or remain influential. But I certainly believe either is possible. The ideas in Perl6 have already influenced mixed paradigm languages like Scala.

    As for your example of C++ and C I think your history is off. C was more tightly tied to Unix culture when C++ arrived. C++ became a default for application windowing environment like Mac and Windows. At the same time, C became standard for systems programming. While there is some overlap in problem domain C and C++ rarely competed.

    Java conversely was solving the cross platform compatibility problem and a desire not to port. It certainly did compete with C++ but competed by offering a feature that C++ simply didn't offer at all.

  31. Re:Second post! by dolmen.fr · · Score: 1

    It also uses the Parrot interpreter to do a neat trick; you can mix languages.

    Well, no. Parrot support has been suspended in Rakudo Perl 6. The other backends (MoarVM, Java) are faster and have more features.

    So Perl6 can use C, Python, etc natively.

    Even if Rakudo still supported Parrot, that would be only possible if C, Python support had been implemented on top of Parrot. Which is not the case. Parrot was a dream that never convinced much people.