That's because any shop that needs to get job done quickly is a Perl shop. During my early career I even knew a architect who had sort of put a blanket ban on any Perl to be written. He was only stumped people were largely acting like pirates, were writing and running directories full of Perl code all the time.
Only a week back, I needed some stuff to be written. Talked to a Java guy, he tells me he can do it in a week. Told him to never mind. Went back to my desk and wrote in a afternoon in Perl. And we are a Java shop and write Java most of the time. But its just that Perl is unbeatable in getting things done.
And yeah Python. It doesn't even remotely hold a candle to Perl in terms of practicality and getting things done. Readability and all that, but frankly beyond that there is nothing in Python. Not even multiline lambdas, half baked, half implemented functional programming features. IO looks like somebody held a gun to the implementors head and he added it because he had to.
Some times I even find, sed and awk to be a million times more useful than Python.
Be careful with that wild generalization. I’ve seen lots more “get job done quickly” in Ruby than Perl (but neither as much as with Python recently). I have nothing bad to say about Perl, but it’s not really defensible to claim it’s used as commonly as other languages.
We also write a fair amount of Javascript on the frontend but moving the backend to Node.js doesn't add any benefits. It just makes things harder, having to track constantly moving targets, using many different tools to accomplish the same jobs, having to fork stuff just to get it to work properly.
― George Bernard Shaw
Not all great decisions are rational, follow your heart be happy
For me, Python is an uninspiring language, yet it inspired many people to build great things, a decision that to me, sound so .. irrational
Very few succeed, but those who do, make big changes
It is a high risk high reward type of decision
But honestly, Perl 6 is not that bad of bet, there while small, a lively community around it filled with brilliant developers
Also, how would you handle strings in this other language?
In P6 and its grammar engine, a string is a sequence of characters, where characters are defined as the thing a human thinks of as a character.
Almost all other languages have adopted either a byte or a Unicode codepoint as being equivalent to a character, both of which are really profound problems that are still not being confronted to this day.
For example, the draft docs for Python 3.7 don't even mention characters (by which I mean what a user thinks of as characters, not bytes or codepoints).[1]
[1] https://docs.python.org/3.7/search.html?q=grapheme&check_key...
I too would hesitate to use it in a commercial context, but only because its development stalled for 15 years, leaving us with almost no developers that still speak perl and still work in the trenches... perl's cost of adaption in comparison to other dynamic languages skyrocketed :(
The popularity argument only makes sense in regards to hiring new people, which is a fair point.
But yes, it is going to make hiring more challenging.
For example: I'm collecting some stats indexed by (small) ints. In Perl, I'd just say
$collection[$index] = $stat;
Try that in Python when $index is not received in order.Edit: Fixed typo; meant "$stat" and not "%stat"
dict[index] = stat
...works much the same. >>> foo = {}
>>> foo[3] = 72
>>> foo[64] = 80
>>> foo
{3: 72, 64: 80} >>> foo = {}
>>> foo[3][4] = 42
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 3
Compared to: DB<1> $foo{3}{4} = 42
DB<2> x \%foo
0 HASH(0x7f9f4315c940)
3 => HASH(0x7f9f432bb148)
4 => 42 tree = lambda: collections.defaultdict(tree)
foo = tree()
foo[3][4] = 42 \%stat;https://trends.google.com/trends/explore?date=all&q=perl%20t...
- “We have lots of deployed code and don’t want to rewrite the whole thing.” That’s valid (although I still urge them to consider the hiring challenges down the road).
- “I’ve used Perl exclusively since I downloaded it over dialup and I’m not interested in those shiny new languages the kids like.” Run screaming.
When you say you wouldn't use Perl again, that's a fine personal choice, but has zero to do with the merits of the language or the people who use it.
I have happy memories of Perl, and it started me on the path that led to a nice career of Python awesomeness. Thanks, Perl! That said, I can't imagine a plausible scenario where I'd ever consider using it again. I almost certainly wouldn't use it professionally because it's not exactly going to light up a resume. Yes, there are still Perl shops. But no, there aren't very many of them, and I'd be highly suspicious of an engineering department still writing new code in it today without a very good reason.