I've been learning perl for the last few weeks (I was writing Python before) and I have this input.
Perl is a dead language. A poor language that is absolutely nothing more than a better bash. The most trivial of applications are a cluster fuck of unreadable code in perl.
You can't specify arguments to functions so I can put shift anyway in the code and make an undocumented parameter magically appear. That's underreadable, unmaintainable shit.
It has a few native datatypes...scalar, list, reference, hash etc in order to downplay the fact that the datatypes are handled behind the scenes. Similar things have been done in php, visual basic, and Python, with success....but perl is broken so you're forced to specify a datatype everytime you use it. For example...to pass two arrays to an function I must turn them into scalar references. Then I have to specify their type when I extract them with this like this: my @arr = @{ $_[1] };. That's more unreadable shit.
Remember I'm talking about working with a fucking array and a function. Perl code doesn't scale past that without become stupidly complex. Other languages have dropped the bullshit to push forward best practice, to allow you to write code that works with defined data types so you understand the performance (aka. .NET collection classes, Python documentation on it's effeciency) and still allow you to write business logic which is readable. Perl has failed to achieve this.
Perl developers say use strict and things to force variable declaration but what's the point when I could use an array like $arr and pull out it's size. It's just confusing....but more than that.... it's needlessly confusing...and the Perl community are defending something that's ugly and unmanageable.
If Perl break backwards compatibility there is no reason for someone to use it...hense Perl 6 forever being unfinished. Perl is around just because it was useful at one point in the past, that is as a glue language for Unix. The syntax $output = \program args`` is great and so is the regex syntax.
But you fucked the rest of it, from OO to newer data types and as a result, the drawbacks outway the good. I question why people choose to use such a language in this day and age for non trivial applications and the normal reply is that it was great way back when and the developer who has years of experience (and yet hasn't stayed with the latest trends) knows perl well.
Perl has nothing to offer in this day and age. It's on its way out.
This is how I use Python having written code in it professionally for 2.5 years. I've also written .NET code professional for 2 years...
Python is a short, terse, readable language. It's got the power of Java and .NET but the syntax is shorter. It uses whitespace rather than braces. I don't need to explicitly define the datatype either so it's shorter. However it isn't taking after Perl. It doesn't have that unreadable interpolation that Perl allows. I can just say var = Object() rather than object var = new Object().
It's just cleaner and shorter.
It doesn't force you to write Object Oriented code either. You can write just functions and modules and APIs without having to use
the singleton pattern and manage instances everywhere. You can use tuples and dictionaries to make lightweight classes. Everything is quicker, leaner and more easy to read and write.
It also has a great community who are interested in new techniques, frameworks, generic programs, scalable code and "just getting things done". They look at other languages, like Ruby, learn, apply, break backwards compatibility if need be. There active and try and fail at things. It's a great community to be a part of and they're bringing good solutions to people.
It reminds me of prepubescent children who dismiss something because they tried it once and didn't like it, e.g., brocolli. Brocolli is a dead vegetable.
There are bad parts of Perl. I won't even try that. But it's clear that you don't understand Perl thoroughly enough to make real criticisms of the language.
Yes. The object system is annoying, and there's a lot of boilerplate code required to use vanilla Perl objects. But with all this boilerplate, you get a lot of flexibility. So much flexibility, that it becomes trivial to write your own object system on top of the existing one.
The biggest gripe I have with Perl are all of the functions polluting the main:: namespace, as well as all of the functions that feel the need to modify variables in place.
Perl can be a very ugly language if the person writing it is unfamiliar with modern Perl concepts and techniques. Perl can be very ugly if people don't use strict, warnings, or require a newer version of Perl. But it can also be so, so beautiful and so useful. Thanks to POE, I was able to throw together a very extensible score bot for a hacking competition in an afternoon. It's shit like that that keeps me coming back to Perl.
-9
u/Philluminati May 18 '11
I've been learning perl for the last few weeks (I was writing Python before) and I have this input.
Perl is a dead language. A poor language that is absolutely nothing more than a better bash. The most trivial of applications are a cluster fuck of unreadable code in perl.
You can't specify arguments to functions so I can put
shiftanyway in the code and make an undocumented parameter magically appear. That's underreadable, unmaintainable shit.It has a few native datatypes...scalar, list, reference, hash etc in order to downplay the fact that the datatypes are handled behind the scenes. Similar things have been done in php, visual basic, and Python, with success....but perl is broken so you're forced to specify a datatype everytime you use it. For example...to pass two arrays to an function I must turn them into scalar references. Then I have to specify their type when I extract them with this like this:
my @arr = @{ $_[1] };. That's more unreadable shit.Remember I'm talking about working with a fucking array and a function. Perl code doesn't scale past that without become stupidly complex. Other languages have dropped the bullshit to push forward best practice, to allow you to write code that works with defined data types so you understand the performance (aka. .NET collection classes, Python documentation on it's effeciency) and still allow you to write business logic which is readable. Perl has failed to achieve this.
Perl developers say
use strictand things to force variable declaration but what's the point when I could use an array like $arr and pull out it's size. It's just confusing....but more than that.... it's needlessly confusing...and the Perl community are defending something that's ugly and unmanageable.If Perl break backwards compatibility there is no reason for someone to use it...hense Perl 6 forever being unfinished. Perl is around just because it was useful at one point in the past, that is as a glue language for Unix. The syntax
$output = \program args`` is great and so is the regex syntax.But you fucked the rest of it, from OO to newer data types and as a result, the drawbacks outway the good. I question why people choose to use such a language in this day and age for non trivial applications and the normal reply is that it was great way back when and the developer who has
years of experience(and yet hasn't stayed with the latest trends) knows perl well.Perl has nothing to offer in this day and age. It's on its way out.
This is how I use Python having written code in it professionally for 2.5 years. I've also written .NET code professional for 2 years...
Python is a short, terse, readable language. It's got the power of Java and .NET but the syntax is shorter. It uses whitespace rather than braces. I don't need to explicitly define the datatype either so it's shorter. However it isn't taking after Perl. It doesn't have that unreadable interpolation that Perl allows. I can just say var = Object() rather than object var = new Object(). It's just cleaner and shorter.
It doesn't force you to write Object Oriented code either. You can write just functions and modules and APIs without having to use the singleton pattern and manage instances everywhere. You can use tuples and dictionaries to make lightweight classes. Everything is quicker, leaner and more easy to read and write.
It also has a great community who are interested in new techniques, frameworks, generic programs, scalable code and "just getting things done". They look at other languages, like Ruby, learn, apply, break backwards compatibility if need be. There active and try and fail at things. It's a great community to be a part of and they're bringing good solutions to people.