> Meanwhile perl's incoherence makes it very hard to write large programs and solve hard problems ...
I've been on teams writing very large systems solving very hard problems in Perl 5 for more than 20 years. I know that some of that stuff that was written in the 90s is still under active development and maintenance today, even though it's several developer generations in the past.
Perl 5 may or may not be 'incoherent'. It is certainly somewhat idiosyncratic. But so is JavaScript, perhaps to a lesser degree.
Perl 5 in the large requires some somewhat different (but not too difficult) disciplines.
But that's not so different than most other languages.
> In many ways I'd say it was the go of its day.
This made me smile! Thank you again.
I think if "it's not a lot worse than Javascript" is the best you can say in its favour...
> Perl 5 in the large requires some somewhat different (but not too difficult) disciplines. But that's not so different than most other languages.
The problem I always saw was that libraries would follow their own styles, so once you had a project that depended closely on several different libraries you'd be forced to cut against the grain of several of them. It's a problem that's lessened in a language with a single standard way of doing OO, a single standard way to do event-driven I/O, or even trivial things like code formatting. Maybe the perl community has found more of a consensus in recent years.
Nowadays I work almost completely in scala, which some people compare to perl, so I'm concerned about not repeating perl's decline in popularity.
The Perl 6 language design directly addresses this problem. The intent is to avoid throwing out the baby (making both timtowtdi and long term language evolution practical) with the bath water (lack of composability of the various ways to do things and of new features that emerge). The Rakudo implementation is most of the way there.
Similarly (same laptop), I can get perl to print its version (5.16.2) in about 0.01 secs (2nd time), but java (1.8.0_11-b12) takes about 0.11 secs (2nd time).
Most of my work is in Java, but it gets to be a tyrannical hammer that must be used for everything in some minds :-(
Again: Parrot having to compete with the JVM makes me sad.
Even with the MoarVM backend, Rakudo takes a lot more time and RAM to startup than the compiler for most mainstream languages. It handily beats the JVMs devs use but that's not saying much.
On the third hand, a few devs have said they are regularly using Rakudo at $work, including for one-liners.
If anyone wants to try P6 I recommend RakudoBrew:
I also think the Parrot VM project added a few years to P6's gestation.
When you say "overly formalized", perhaps you mean the early break out of mailing lists and especially the Parrot project? I don't think "overly formalized" fits the last decade of Perl 6 development -- Pugs (2005 - 2007) was distinctly anarchistic.
IMHO, it was coherent. But the syntax is wierd (may be usage of symbols $%@{}[] ) for people unfamiliar with it.
I haven't done big projects with perl in the last 12 years. But when I need it, it is like riding a bike.
I'm really afraid that Rails is going the same way, that the DRY mantra is going to eventually lead to a Huffman encoding only parseable by Rails experts, and then no one new will want to get on board.
Most of Perl 5's syntax comes from well established (for perhaps a decade) UNIX culture, from shell, awk, sed, and C syntax conventions. Vanishingly little is actually novel to Perl.
Rails, which is obviously not a peer to Perl, but which you bring up as "going the same way," does similarly have a huge emphasis on convention. But most of its conventions are de novo, made up within the Rails/Ruby community.
You can hate Perl (5) all you like; no accounting for taste and all. But if you find parts of it unfamiliar, it's probably because you are ignoring (or ignorant of) where it came from.
Standard Perl 6 has just these non-English variables:
- $_ means "it"
- @_ means "args"
- $! means "current exception/error"
- $/ means "last match"
- $0 means $/[0], the first captured value of the last match
All other system variables have understandable English names, eg:
- $IN means the STDIN object/handle
- $OUT means the STDOUT object/handle
- %ENV means a hash (dict, associative array) of system environment variables
- $PID means the system process id
- $*KERNEL means the operating system kernel running under
Etc.
* $_ means "it" * @_ means "args" * $! means "current exception/error" * $/ means "last match" * $0 means $/[0], the first captured value of the last match
All other system variables have understandable English names, eg:
* $IN means the STDIN object/handle $OUT means the STDOUT object/handle %ENV means a hash (dict) of system environment variables $PID means the system process id $*KERNEL means the operating system kernel running under
Etc.
I have some issues with Ruby "helpfully" letting you leave out more and more syntax, like parentheses from multi-argument function calls, or saying you don't need {} if the last argument is a hash, which are easy to grok if you already know Ruby but can be yet-another-confusing-rule for newbs. But those are relatively minor.
as far as the hash, you can always inspect the actual arguments being passed, which doubles as a nice learning exercise for beginners.
Aiui Larry Wall believes it will be significantly easier for Perl 6 to evolve than for Lisp to do so, without falling in to the Lisp Curse trap.
-l modifies the output record separator (makes print append \n)
The downside of the emphasis on practicality was that the language always suffered from incoherence; with no principled foundation it's been slow to adapt as the practical things users want to do change (e.g. I'd argue string manipulation is a lot less important than it used to be - if you were writing perl today, you might give json manipulation the same prominence as regexes). Perl 6 may have been an effort to fix this, but went too far in the opposite direction; overly formalized, with a premature separation between VM and language that massively slowed development.
There's a lot of good stuff about modern perl - Moose and the like - but IMO it's too little, too late; other languages have been able to improve their infrastructure to (mostly) match perl for easy things. Meanwhile perl's incoherence makes it very hard to write large programs and solve hard problems, where languages with a firmer theoretical foundation and stronger stylistic principles have a huge advantage.