Hacker News new | ask | show | jobs
by DonHopkins 4151 days ago
>"most of the other languages were modeled on it."

Having a regexp library is hardly "modeling a language on Perl".

"Most" of exactly WHICH languages are you claiming were modeled on Perl?

>Perl is a language that is still ahead of its time.

Perl's time was 15 years ago.

>"Also, Perl's library system, CPAN, is far more comprehensive than many languages."

A library and a language are apples and oranges. Python's library ecosystem is more comprehensive than Perl's language. Because most any language minus all of its libraries is less "comprehensive" than another language's libraries, simply because most mature library ecosystems are much more massive than the language itself.

Even if you compare apples and apples then oranges with oranges, Perl is a terrible language compared to most other languages, and most of CPAN is terrible outdated crap compared to other language's libraries. Python, Ruby, Java and JavaScript all have much richer and more up-to-date library ecosystems than CPAN.

>"By the way, Python is a great language, except for all the tabbing nonsense."

Is the worst thing you can say about Python that it forces you to indent your code? Then I'd hate to see the haphazardly indented code you write in Perl. Good programmers don't find that to be a problem, because they indent their code properly anyway, and Python simply lets you do that without inserting a lot of punctuation. But inserting lots of punctuation is what it's all about with Perl, isn't it?

4 comments

> Is the worst thing you can say about Python that it forces you to indent your code?

That's an unduly simplistic argument. "Indentation that looks clean" and "Indentation that fulfils Python's specific needs" are not the same: one is a superset of the other. This means that enforcing the latter is in fact an extra burden and a loss flexibility. Whether the burden is less than having to write braces all the time comes down to personal taste, but to pretend that it does not exist is dishonest.

In any case I could get used to the significant indentation. What actually repels me the most from Python is the lack of non-broken lexical scoping, which - together with the "only one expression per lambda" limitation - makes closure based programming solutions awkward and hard to get right in Python. Which is unfortunate because I personally really like those kinds of solutions...

The ironic thing is, that this situation leads many Python programmers to believe that closures are inherently complicated/difficult/bug-prone, and sneer at languages which promote them heavily as "not newbie friendly".

To get back on the thread's topic, Perl 6 is one of those languages where function and variable handling is built on proper lexical scoping, and closures are everywhere. Even regexes are closures, in the sense that they are treated as first-class code objects (that just happen to be written in a different syntax), and if a regex uses variables from other Perl 6 scopes it closes over them.

Maybe I'm the only one who feels that way, but that kind of thing excites me in a way that Python never could.

But to each their own!

>>"most of the other languages were modeled on it."

>Having a regexp library is hardly "modeling a language on Perl".

I don't know about most, but both PHP and Ruby were heavily influenced by Perl. If you've used both, this should be apparent, if not, you can easily find references on record to the effect. The original statement may have been a bit hyperbolic, but in context and with constraints something similar isn't unwarranted. E.g. "Perl was very influential to many of the most popular scripting languages today."

It's true that most popular scripting languages today were influenced by the same scripting (and other types of) languages that Perl was influenced by. Namely shell scripting and Lisp.

What I object to are the terms "most" and "modeled on", each of which are hyperbolic, but taken together are "hyperbolic squared" (to stretch the mathematical metaphor).

And Perl 6 hasn't had much influence at all, since nobody's been able to use it for anything practical in the last 15 years.

At best, Perl 6 has influenced people to learn other languages than Perl, which is a good thing, I suppose.

You are really reaching to say that sed/awk/shell and Lisp were more of an influence on either Ruby or PHP. Ruby has all the same special variables as Perl, FFS! PHP was originally written in Perl. But somehow awk was the bigger influence in either case?

Sorry, but your retcon fails. Even Scala admits it has Perl influences -- http://perl8.org.

There could be a misunderstanding. The editor indents the code and keeps it indented properly whatever it happens, not the programmer. I don't have to worry about which indentation level is the right one for the code I'm writing and the bugs I'll create if I get it wrong. I press tab and emacs places it where it must go, if it's not already there, which is the case unless I'm doing copy and paste. At least this is my experience with languages that have block delimiters.
> A library and a language are apples and oranges. Python's library ecosystem is more comprehensive than Perl's language. Because most any language minus all of its libraries is less "comprehensive" than another language's libraries, simply because most mature library ecosystems are much more massive than the language itself.

That doesn't even make sense.

What he said, "Also, Perl's library system, CPAN, is far more comprehensive than many languages", doesn't make sense, because he's comparing a "library" to "languages": apples and oranges.
Come on now, it's clear that he meant to compare CPAN to the corresponding module repositories of those other languages.
I was only taking what he literally wrote at face value. I'd expect a Perl programer to be more careful with punctuation that that. ;)