Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Perl Programming Upgrades

Perl 5.14 Released 187

chromatic writes "Pumpking Jesse Vincent has just released Perl 5.14, the latest stable version of the venerable Perl 5 programming language. The list of changes in Perl 5.14 includes several enhancements, including performance tuning, Unicode improvements, and updates to the core libraries and documentation. Perl 5.16 is on track for a release next April."
This discussion has been archived. No new comments can be posted.

Perl 5.14 Released

Comments Filter:
  • What about Perl 6? (Score:0, Interesting)

    by Anonymous Coward on Saturday May 14, 2011 @08:01PM (#36130016)

    Wasn't Perl 6 supposed to be available about, oh, 11 years ago?

  • by gman003 ( 1693318 ) on Saturday May 14, 2011 @08:26PM (#36130142)
    Actually, I've always thought there should be one more common operator - "===". In floating-point context, it would be "approximately equal to", returning true if the arguments are within 10 times the smallest representable value. That would reduce problems with floating-point comparison. Hell, make it work for integers too - it might be useful in PLCs and stuff.

    In a string context (in Perl, it would have to be something besides ===, but we'll get to that later), it would be "visually equal to" - any characters that are visually equal would be considered equal (useful mainly when using Unicode). So the Cyrillic "e" (0435) would be considered equal to Roman "e" (0065). I'm not sure how to handle complexities like "is the single character 'small a with macron' equal to the sequence 'small a' and 'combining diacritic macron'". We'll need a committee for that, probably. And since Perl uses different operators to determine context, we'd need something else for that. "veq", maybe?

    This would, ideally, not just be a Perl construct. I can think of a lot of higher-level languages that could use that. Python. Ruby. Lua. Stuff like that. Lower-level languages probably would be better off without it - C does not need such an operator.

    Just something I've always felt could be useful to have. Sure, there's probably some library that can do those things, but it would be nice to make things simpler.
  • by dskoll ( 99328 ) on Saturday May 14, 2011 @09:13PM (#36130358) Homepage

    We still use Perl to develop our products (commercial and open-source.) Perl may be maligned, but it's still a good tool for a lot of purposes and if you pick and choose carefully, CPAN is an awesome resource. Perl has modern frameworks (eg, Catalyst) for Web development that are competitive with anything out there, and DBI is superior to most alternative languages' database libraries.

    While I'm bullish on Perl 5, I'm not so optimistic about Perl 6. I think it's suffring horribly from second system syndrome and may never see the light of day as a useful production tool.

  • by Nutria ( 679911 ) on Saturday May 14, 2011 @10:36PM (#36130688)

    it means you probably shouldn't be writing software that uses floating point.

    Since I'm not a scientist or graphics programmer Floats are as damned useless and destructive as needing pointers to do string manipulations in C.

    BCD should be the default data type for decimal arithmetic.

  • by aixylinux ( 1287566 ) on Saturday May 14, 2011 @10:37PM (#36130694)

    I agree completely. As a UNIX sysadmin I frequently write scripts. For short and simple things, shell is preferred. But if I anticipate any complexity, I reach for Perl. I've had the experience of getting deeply into a shell script and thinking "I should have used Perl". Perl has never let me down, although I confess at times the programs have that write-only, line-noise appearance. But that's just because I've learned to use the idioms, and I comment on the complex stuff for the benefit of those who follow me--which could include myself six months later.

    I'd write Ruby if I could. The syntax is cleaner, and objects are built-in, not bolted on. But Ruby is just not available where I need it. Does anybody know of an AIX LPP package for Ruby?

    Also, I've been deeply disappointed at the progress of Perl 6--but Perl 5 does everything I need, so I really don't miss it. Of all sad words of tongue or pen, the saddest are these--it might have been.

  • I somewhat agree, however the floating point implementations SUCK at powers of ten -- you should specify epsilon in terms of powers of two. Hell, even my correct decimal text to float/double parsing function is 8 times more complex than the same in hex Why, even C has a hex float/double literal that goes something like this:
    /[+-]?0x[0-9a-f]+\.?[0-9a-f]*p?[+-]?[0-9a-f]*/i )

    The "p" in there stands for "times Nth power of two" similar to the "e" in decimal floats meaning "times Nth power of ten". eg: 0x123p-8 == 0x1.23

    Note, hex decimal places act like decimal's do eg:
    0x1.23 == (dec) 1 + 35 / 256 == 1.13671875 or (hex) 0x1 + 0x23 / 0x100 == 0x1.23

    Specifying floats in the language of the computer's math (binary representable fractions) allows you to actually use equality properly ;-)

    Some of my languages have the === operator already, similar to JS's exact match, perhaps ~=~ or =~= or "approx" would be better?
    I've thought of adding an "approximate" operator -- esp. for physics simulation & game DSLs.

    Although, what's wrong with specifying your required precision? Define your own epsilon (error factor).

    print "$a is approx $b\n" if ( $a > ($b - $epsilon) && $a < ($b + $epsilon) );

    # Compared to:
    print "$a is approx $b\n" if ( $a approx $b );

    # Oh, great, now we need another obscure magic special variable to contain epsilon...
    # Perhaps
    would do? Our English users won't mind using character map...

  • by ducomputergeek ( 595742 ) on Sunday May 15, 2011 @12:15AM (#36131044)

    Our entire API framework is Perl and has been for a few years now. Seemed like every time we needed to add a new format to return values in (originally was XML) like JSON, there always seems to be a perl module "for that".

    The best part of things is the fact that while we've added new functionality, we haven't had to do any maintenance work on the script in almost 5 years now.

    Biggest change we made from 5.8.x to 5.10 was rewrite some nasty els if statements and made them switch statements.

    The original web based management tool was originally written in PHP and that is what took all the time to maintain. It seemed like with each dot release of PHP some little thing broke and we were always fixing something every few weeks because of it.

  • by bill_mcgonigle ( 4333 ) * on Sunday May 15, 2011 @01:13AM (#36131276) Homepage Journal

    Perl 6 has 140+ different operators! That is absolutely insane. While I support being concise, Perl has far more complexity in the language core than any other language I have ever seen.

    I like this about English too. Can't tell that Larry is a linguist by training, can you?

    Come to think of it, I bet Python developers tend to be fond of Esperanto too. Some similarities there.

  • by Greg Lindahl ( 37568 ) on Sunday May 15, 2011 @02:02AM (#36131484) Homepage

    The new search engine blekko is written in perl - wrote our own NoSQL database in it, too. We found CPAN to be an awesome resource; we use 600 distros from CPAN, and only found a couple of bugs in them.

    It's Java that's the new COBOL. (buh dum, ching!)

Happiness is twin floppies.

Working...