Earlier quoted context omitted.
Honestly, AFAIK only PHP comes with a bigger laundry list. The only python wart I know is no block scope for i in [1,2,3]: print i print i # still visible Only functions introduce lexical scope in Python/JS. JS has the ===, this, undefined The only ruby wart for me is the difference between block/lambda/Proc and perly features. Java/Go/Lua don't turn you into a omlette, with their language features. Nor do they leak…
Then you don't know anything about Ruby and Python warts. Take yourself out of the conversation please or at Google before you blather.
Perl 5.18.0 is now available
51–60 of 69 posts
Re: Perl 5.18.0 is now available
#52Earlier quoted context omitted.
I use points as I am a bad writer. * Don't use $a, $b for variable names, affecting sort * Don't use each for iterating over hashes * Global effects of .. * next operator is dynamic sub foo() { next; #breaks while loop } while(defined (my $e = shift @items)) { # "0", 0 is false foo(); } * http://www.perl.com/doc/FMTEYEWTK/versus/perl.html * Exception model based on $_ and $@ * print "$foo's fun!"; * `use constant` is…
Perl is old. By old I mean powerful, mature, stable, and well known. Some say it is hard to read. I don't know since I have been using it in production since version 4.
Re: Perl 5.18.0 is now available
#53Just curious: Is Larry Wall still involved in Perl development? Haven't heard from him for a long time...
He is solely working on Perl 6 now.
Re: Perl 5.18.0 is now available
#54Earlier quoted context omitted.
Perl 6 isn't perl.
I think there should be some kind of changing of names. For a while it looked like it's another incremental step, if a big one. Which obviously requires running two implementations in parallel for a while -- similar to Python 2 and 3, or several operating systems and distros. But right now, especially once Perl development really picked up, it might be time to "divorce" the two languages. It seems more like Algol60 v…
Re: Perl 5.18.0 is now available
#55Earlier quoted context omitted.
I think there should be some kind of changing of names. For a while it looked like it's another incremental step, if a big one. Which obviously requires running two implementations in parallel for a while -- similar to Python 2 and 3, or several operating systems and distros. But right now, especially once Perl development really picked up, it might be time to "divorce" the two languages. It seems more like Algol60 v…
Here's mst's suggestion for changing the name Perl 5 to "Pumpkin Perl": http://shadow.cat/blog/matt-s-trout/pumpkin-perl-breakdown/
Re: Perl 5.18.0 is now available
#56Earlier quoted context omitted.
Then you don't know anything about Ruby and Python warts. Take yourself out of the conversation please or at Google before you blather.
Enlighten us.
http://wiki.python.org/moin/PythonWarts
Here is one of the first Google hits for Ruby:
http://jgaskins.org/blog/2012/05/16/ruby-warts/
Every languages has warts. Lots of them.
Re: Perl 5.18.0 is now available
#57Earlier quoted context omitted.
> variables, like $_. Which you don't use in real programs Oh really? What's wrong with $_ and since when it is?
It's kind of obtuse. If you have to type out "$_", you might as well declare it and give it a good name. I personally have no issues doing: foreach @array { chomp; print; } But as soon as I have to type "$_" I make a real variable.
Re: Perl 5.18.0 is now available
#58Earlier quoted context omitted.
This is why wise Perl programmers turn on use strict, and then declare variables with my. Now attempting to dynamically scope stuff is a compilation error. (Except for some built in variables, like $_. Which you don't use in real programs.) This has been standard advice since the last millennium. But you can't change it without breaking backwards compatibility. That said, I do have several good uses for local. But no…
> variables, like $_. Which you don't use in real programs Oh really? What's wrong with $_ and since when it is?
A specific problem that fixed this in my memory was a bug in my co-worker's code which boiled down to his looping over an array with $_, then calling a function in his loop that was in a CPAN library that assigned to $_. The result was that he wiped out his whole array.
Whenever you are calling out to code that someone else wrote, you don't know if issues like that could exist, and therefore it isn't safe to use $_. Conversely if you're writing code that someone else will call, be a good citizen and don't assign to $_ either implicitly or explicitly.
Re: Perl 5.18.0 is now available
#59I understand why smartmatch is labeled experimental, but what's the "modern Perl" replacement for given/when? I only use it as a stupid switch statement but I don't want it breaking with Perl 5.22 either...
Re: Perl 5.18.0 is now available
#60Earlier quoted context omitted.
You can use perlbrew to install any version of Perl your heart desires in a local directory of your choosing. You can also install multiple versions and easily swap them.
We deploy to a RHEL server where the stock Perl is 5.8.8. Sure, migrating that to a perlbrew/local::lib setup with up-to-date CPAN modules would be really nice, but would require some major testing, and right now nobody has the time for that. Never change a running system sigh ... But hey, generally it's not a big hassle, from a programmer's perspective that version ain't that outdated. About the only thing I really…