Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
My brother in law works in Perl and he thinks it's the dog's bollocks, but I wouldn't want to work in Perl any more than I'd want to work in PHP. Being fair though I expect it's better than PHP though (wouldn't be difficult).

Brother in law comes out with stuff like "Perl 6 is the only language with true unicode support" (I'm definitely failing to quote him verbatim here, but he has a habit of coming out with provocative statements that invite disagreement).

Why should anyone fancy doing a project in Perl, OP, and not some other scripting language like Python or Ruby? Isn't it a bit of a dead end if you want to learn languages you can use to get a job?

Adbot
ADBOT LOVES YOU

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

qntm posted:

Perl code:
print reverse "hello world";
# "hello world"

my $string = reverse "hello world";
print $string;
# "dlrow olleh"

explain this. I want to know how this programming language can be so bad.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

qntm posted:

Perl has a unique feature known as context-sensitivity. Every Perl expression is evaluated in one of two contexts, list context or scalar context.

This sounds extremely bad and needlessly confusing, and likely to be a huge source of bugs. It seems to me that it would be much better to have the user explicitly indicate what sort of behaviour they want than try to be clever and let them change the program's behaviour subtly through context. Can someone explain why I'm wrong?

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
I think you'll find it should be

my $count ≗()= $str =~ /myregex/g

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply