Perl's Problems
perlhacks.com
perlhacks.com
So here's my take on it:
1. Syntax. And how it's almost impossible to change it after a certain level of language-adoption. Perl coders knew it needed to be radically changed, understood how that was impossible, and moved on.
2. As a result of 1: the shrinking community. It is a clear red flag, no-one wants to start a project in based on (soon to be) legacy technology.
3. The existence of very suitable languages for Perl-refugees. When Perl ruled the web it was pretty much the only open source, web-focussed, runtime-typed language with a package manager fully of goodies. But with Ruby, Python (, etc.) and their very active communities around, it became very easy to switch.
4. It missed academic backing. Having programmers "schooled" in a particular language seems to be important in this world. The winners in this area seem to be Java, C-Sharp, C++, C, Python and to some extend Haskell; Perl never managed to enter this league (and does not seem very fit).
For a while at least, Perl did find a home in Linguistics. While it was because of the excellent text parsing tools, it makes a strange kind of sense as well, since Perl was designed to be a bit more like a human language and I think Linguists appreciated that. But that's such a small field that the impact was negligible. Most of the modern Computational Linguistic work is done in Java and Python these days, but for a while, many people working in Linguistics came out of their undergrad with at least a passing familiarity with Perl.
For a briefer spell, I seem to remember Perl finding a home in bioinformatics for much of the same reasons. I have no idea what or if that field has moved on to.
For me personally, Perl was the ultimate hacker language when people needed to get shit done and that shit involved munging lots and lots of files in text. But I think these days the world has moved onto other things that Perl isn't any better suited for than some other language (which is then conversely better suited for a bunch of other stuff than Perl).
ADD A TO B GIVING C
edit here's some background on the Perl linguistics angle: http://world.std.com/~swmcd/steven/perl/linguistics.html
Perl did have something of a stronghold in bioinformatics (sequencing the human genome etc.), although other languages are catching up.
That being said, teaching a language, vs using a language to teach can be two entirely different animals.
This is certainly a annoyance compared to e.g. Ruby. It's getting easier to just always use references [0], but I haven't been using Perl much for a few years and am not sure if this is still considered experimental.
[0] http://search.cpan.org/~rjbs/perl-5.20.0/pod/perl5140delta.p...
I love Perl; I hate Perl. I wish Ruby was faster...
The existing perl6 projects can figure out their own branding, because it's clear they are no longer "successors" or replacements for Perl.
Larry is a brilliant guy, but (like everyone, really), he's not brilliant in everything and (like most people seen as absolute geniuses, so relatively few people), what he's not good at, he finds so frustrating as to condemn it, and cry foul at the very concept. This helps no one.
I don't know how to teach someone humility.
Anyways beating a dead horse.
The next release in the perl5 series could be Perl 7, similar to what PHP [0] has done to avoid confusing their next major release with a previous, failed effort to create a new major version.
That still forces perl6 to rebrand but won't induce massive confusion.
This is not a reality with which I am familiar. I like the idea of APL; I even did some, years ago, but this feels strawman-y to me. Even in the J/K/APL crowd, the running joke is readability.
I would suggest that is obviously false. Most languages have operators. Is 4+5 really less readable than plus(4,5)? Haskell does not have very many operators. The fact that people see 3 operators they are not familiar with and decide "this is unreadable because of so many operators" speaks rather poorly of people's desire to learn.
NB: I know a little German, and almost no Haskell.
In fairness, there are good ways to search the documentation for those operators so at least you aren't stuck googling for line noise.
Bind a function which gets the contents of my system tmp directory to a function which takes anything and returns a monad, then return the evaluated monadic result.
Haskell doesn't really have that many operators built-in (that is, in the standard Prelude). Haskell is completely open to user-defined operators (whose names can either be alphanumeric or symbolic), which, combined with the fact that symbolic operators often are attempt to approximate symbols from the application domain in ASCII while avoiding duplication of symbols used in the prelude even if those in the application domain are the same as those used in the prelude often results in less-than-intuitive choices.
Whether this is more or less readable than alternatives, though, is pretty subjective -- operators are generally used to reduce visual complexity in a way which is (given the constraints discussed above) as familiar as practical given the notation used in the domain, so even with the problems introduced by those constraints I think it often results in code that is at least as readable, and often more, than the cumbersome structures that are the alternative in languages that don't support user-defined operators.
Or to phrase it another way, typical code prefers good names over lengthy names. See, having a preference is fine. But acting like your preference is objectively correct is not.
Since that didn't work, I'll be more explicit: in my opinion, an unfamiliar operator is usually both a terse and a bad name.
My argument is that I believe using descriptive words, even if they are longer, usually makes concepts easier to understand while reading than using either terser words that are less descriptive or symbols that are not in common use. That's not fact, but it's different than just saying "I don't like X".
The problem with your new argument is that it is just rephrasing "if I don't learn X, I don't understand X". The operators commonly used in haskell are in common use, by definition. Haskell is not unreadable just because you didn't learn how to read it. No, basic_arithmetic_addition_function is not clearer than +. So why would needlessly_long_name_that_conveys_no_extra_information be clearer than >>=?
Operators in common usage, like ">>=", are not at all a problem, because as you suggest, they only need to be learned once and aren't easily forgotten. Operators that are never used are also not a problem, because they are never used.
But I do see a problem in the middle, where I see an operator, figure out what it does, and then don't see it again for some time. Re-learning less frequently used operators constantly is not very efficient.
Your fake names are a false choice. The trick is to find good descriptive names, and using a name that is annoyingly long is probably worse than using one that is frustratingly terse. The trick is to pick a good one.
You could also say:
> Re-learning less frequently used command line programs constantly is not very efficient.
However in my experience re-learning is much easier than learning the first time. For instance if I've used a command line program before I can glance at the manual and figure out what I need very quickly.
Terse code is useful for domain experts, it allows them to quickly assess what's happening without having to read a lot, and have more of the program logic in the field of view at a time. Unfortunately it's hard for beginners to understand because a lot is implied through idiomatic usage.
Verbose code is easier for beginners, but domain experts may find it cumbersome and a chore to both read and write.
Perl has found an interesting spot on this spectrum, as through TIMTOWTDI it has the capacity for verbose code, as well as terse, idiomatic code. I'm not sure if that means it's optimized for intermediate level users, or if it's just schizophrenic.
Yes, they are certainly hyperbolic. But the idea was to make the point that longer is not better. If a variable has a short scope, you do not need to constantly be reminded what it is. If a variable is very general, a very general name is fine. Generally haskellers consider names like 's' and 'x' and 'i' to be very good names. Code is generally optimized for being read by people who know the language, not by people who are unfamiliar with it.
I found myself wondering what the point of using "s" and "z" instead of "succ" and "zero" could possibly be, besides some sort of mathematical bravado.
It's kind of sad that functional programming lanuages have regressed and treat higher dimensional tensors so poorly. Libraries like repa for haskell are nice, but they don't approach the flexibility of APL.
Wasn't "Perl 6" just a tentative spinoff from "Perl 5.6", and didn't Perl programmers start unofficially refering to subsequent versions of Perl 5.x as "Perl x", i.e. Perl 5.7 as "Perl 7" and the latest version as "Perl 20" ? Better make official how Perl programmers are speaking anyway and call the next version Perl 21.0
No. Perl6 is a complete redesign of the language, unencumbered by backwards-compatibility. One of the design goals was to make it extensible on as many levels as possible (proper specification, multiple backends, meta-object protocol, pluggable syntax, macros, FFI, ...) so that another rewrite won't be necessary in the foreseeable future.
didn't Perl programmers start unofficially refering to subsequent versions of Perl 5.x as "Perl x", i.e. Perl 5.7 as "Perl 7" and the latest version as "Perl 20"
Not that I'm aware of, but I'm on the edge of that community.