5 ms·
> 1) Works 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
by mattbillenstein 7y ago
> 1) Works
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"
- roryrjb 7y agoPerl is a general purpose programming language. The Perl interpreter and language are stable, it's not going anywhere soon. Perl and its syntax have been around a lot longer than most other languages and is very similar to C, C++, JavaScript and PHP. What do you consider normal syntax?
- vultour 7y agoThe most obnoxious parameter passing in existence? The magic variables everywhere? Perl code is an unreadable heap of spaghetti, I’d much rather be figuring out unallocated memory bugs in C then read Perl.
- nerdponx 7y agoDon't forget sigils. Because the difference between @foo and $foo is obvious, right?
- cygx 7y agoThat difference is indeed obvious. The issue is sigil variance.
- roryrjb 7y agoNot to someone who doesn't know Perl. But this is the same for every language. No one should be picking up a new language and working with it if they don't know it. 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.
- yellowapple 7y ago@ → A → array $ → 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".
- roryrjb 7y agoBut why obnoxious? Do you know how old Perl is? Have you written shell scripts before? My point is, some of choices Larry and others made wouldn't necessarily be made today, but there's a history, a lineage, a reason for all of this. I actually like the magic variables, but as I said in my other comment, you need to learn it first. X language is an unreadable heap of spaghetti if the programmer writes X language in an unreadable way.
- hedora 7y agoIs its function parameter passing really more obnoxious than python, which lets you mutate the default parameter across calls: 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.
- cutler 7y ago"Vell, zis is perfectly normal behaviour for a python", to rephrase Gag Halfront.
- isostatic 7y ago> Almost anything can "work" Yet after yesterday's attempt to get a small cherrypy webserver running, python doesn't.
- mattbillenstein 7y agoIf 1 out of 100 people fail to do a thing, it doesn't mean that thing is bad...
- yellowapple 7y ago1 out of 100 might be understating it, though. Or it might be overstating it. Who knows? 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).
- isostatic 7y agoHere's a perfect example of the python community https://stackoverflow.com/questions/54831915/python-3-5-2-installation-of-cherrypy-with-apt 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.