1) Works
2) Is ubiquitous
3) Is stable
4) Is normal (semicolons, braces etc)
On which systems do you have Perl readily available but not Python?
Perl documentation online applys to versions of perl that are installed. Python stuff is all bleeding edge - you'll research why something isn't working and after 30 minutes find it's expecting python 3.7.
The whole concept of "virtualenv" gives me an impression of fragility I don't get with perl.
How ancient is that system?
No matter, that system is going to be decommissioned and functions will go over to a new EL7 install.
It just stalls that project till the new server is ready.
This is not how you deploy software
Perl 5 is Perl 5 everywhere.
Where I work, a few of our legacy systems are still dependent on ~v5.10, which can be a real pain when trying to port code back to legacy. I agree that the Python versioning problem is perhaps more prominent, but Perl 5 doesn't really get a free pass here.
Because of the stability of perl5, I barely care what version of perl5 that ends up being. (Perl 5.10 and up is pretty much what I want, 5.8 and 5.6 are a drag if i might need unicode)
Not that installing Python is especially difficult, but still.
What was your first programming language? Because what seems like normal to you mostly depends on you.
QBasic, then Visual Basic for real programs.
Look across a bunch of common languages - Java, Perl, Python, Javascript, PHP, and of course C/C++/C#/ObjC, braces + semicolons. Even Bash and Go have braces.
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance
Back to the topic, while I don't think its ranking doesn't generally reflect the actual popularity, the TIOBE index [1] is a good definition of "common enough" languages. So let's see... oh! There are 5--7 programming languages out of top 20 that do not generally use both braces and semicolons! (Python [not-so-strictly-necessary semicolon only], Visual Basic .NET, SQL [semicolon only], Assembly language, MATLAB, Visual Basic and Delphi/Object Pascal [semicolon only]). I also happen to know less popular but well-known programming languages that do not use both braces and semicolons at all (ML, FORTRAN, Lua, Forth and of course all lisps). So please allow me to reword your claim: why should braces and semicolons be normal?There is no "normal" syntax. There is more to languages than those inspired by C.
Almost anything can "work"
> 2) Is ubiquitous
So is awk, don't write software in it.
> 3) Is stable
This will become questionable as Perl slips into non-maintained mode.
> 4) Is normal (semicolons, braces etc)
Perl syntax is very far from "normal"
Perl 5 has dereference operators, which got called "sigils" by lazy documentation and book authors.
EDIT: To clarify, I mean there should never be the expectation that you can start working in a language in earnest without properly learning it.
$ → S → scalar
That's how I learned and remember them.
What makes that less obvious is when you work with references to arrays; the reference itself is a scalar, so it gets the scalar sigil. You can dereference it, though, by sticking an array sigil in front of it, thus telling the interpreter "hey, this is a scalar reference to an array".
Python3, which is incompatable with python2, came out in 2008.
If you're going to judge python by python3 you should at least hold perl to 5.020
Same age as Haskell.
def foo(bar=Bar(1)):
Unless bar is a primitive type, in which case each invocation gets the same value?
def foo(bar=1):
Perl wears its idiosyncrasies as badges of honor. Python keeps them hidden so they can sneak up on you when you least expect it.
Yet after yesterday's attempt to get a small cherrypy webserver running, python doesn't.
As another data point, I've had very few good experiences with Python. The primary exception has been with PyQt5, and chiefly by going with Qt's conventions instead of Python's (i.e. being as Qt-like and un-Pythonic as possible).
https://stackoverflow.com/questions/54831915/python-3-5-2-in...
> I want to run this on a production Server with ubuntu 16.04. My Sysadmin tells me that I shall not use pip or github repository, because of ... something wrong with using anything but apt ... he says.
Sysadmin is right.
First response?
> sudo apt-get install python-pip
Now there are ways to convert modules to debs (or rpms on redhat style machines) so they can be managed cleanly across an estate, but that's not the python way.