Ask Larry Wall
About what? Perl is probably a good topic choice. No one knows more about Perl than Larry Wall, right? We'll send 10 of the highest-moderated questions to Larry by email, and post his answers when we get them back. Note: Due to Slashdot's line length restrictions, lines of code over 50 characters long may not display correctly. Please be aware of this if you include code samples in your question.
If you are not going to use everyday, don't bother learning it. The P in "Perl"
stands for practical.
Perl doesn't have much linguistic inovations of it is own, it is just a reimplementation
of ages old techniques. The much celebrated syntax is lifted straight up from unix shell
and it is stream manipulating siblings (sed, awk, et al.) That is where the funny $@% prefixes
come from (we know @ is straight from Lisp's backquote and array splicing syntax, much used with
Lisp macros.) The regular expressions are nothing but Lex on steroids, I almost always rewrite
my production perl code with regexes in C and it is very easy to do this, I don't even write C,
I just write Lex rules in a lexfile and implement the case handlers in simple C.
Perl is cool when you are a newbie coder who knows nothing but C/C++/Java, because those languages
are expensive to "set up". You need alot of support code just to implement the simplest ideas.
Perl has alot of things built in; high level data structures, memory management, clean string
manipulation utilities, networking, GUI and more libraries than you can shake a stick at.
But you know what? Perl is only AWESOME because we -as student programmers- were introduced to
very low level languages in school, and don't have any ideas there exists extremely powerful
laguages, with elegant syntaxes to die for.
If you just want to learn about perl's "innovations", I invite you to learn Smalltalk, Prolog, or
Lisp. Mostly Lisp.
Polymorphism is the key to OOP. Its what makes everything reusable, and melds everything together in a program.
Most OO fans will say something like "X is the key to OOP". Yet X is always different. X has been "composition", "patterns", "inheritance", "abstraction", "reuse", "encapsulation", "modeling noun interaction", etc. etc. etc.
I would like to ask Larry what he *feels* about OOP rather than what Perl does with it. If you want to know what OOP features Perl has, then RTFM.
Please, don't waste questions on stuff that you can find by RTFM.
(oop.ismad.com)
Table-ized A.I.
Ahhhh, Grasshopper, if only that were true.
I have seen firsthand so-called "professional programmers" using Java to create some of the worst God-awful spagetti code I have seen in my 15+ years of . No matter what the virtues and ideaology behind any language, someone can come along and screw it up beyond recognition.
Power tools in the hands of amateurs regularly results in the loss of limbs.
-Steve
Hey, Windows users, there is no such thing as "forward" slash, there is only slash and backslash.
Could you please put in multi-line commenting in the next version of Perl? My # key is getting rubbed off.
OddManIn: A Game of guns and game theory.
You listed two tasks and two different languages-- so reason #1 to use Perl over those others is so that you don't have to learn a new programming language each time you get a new problem domain. Just a thought... and personally I'd use Ruby over Perl for both of the above because it has all the compactness and power with absolutely none of the line noise.
I do not have a signature
*Cough* underrated? Perl can be written simply so that a C programmers(or yes, even Fortran programmers here where I work) can understand what's going on. Not many other langauges have that sort of versatility. Also, if you would *RAFM*, you could quickly pick up its idiosyncracies and write things a lot quicker than in most other languages. And difficult to install? That's funny...it's standard on just about every UNIX distribution, has a Mac port, and has a company (that successfully makes money) that backs it, selling tools and offering free-for-enterprise-solutions interpreters for Windows. Install? I just double-clicked and hit enter a few times.
--- What
A scripting language is one that you don't like.
A programming language is one that you do like.
"Doesn't look like you need to know much about inheritance, polymorphism, and static class methods to me." -- says the man as he defines a static class method.
Never underestimate the bandwidth of a 747 filled with CD-ROMs.
It is called Faith.
Irrelevant. Just because a person copies "public static void main" out of example 1.1 in Learn Java in 24 hours doesn't mean they understand what it means. I would wager that 90% of Perl programmers who use "my" regularly don't have a clue about lexical vs. dynamic scoping, but it doesn't matter because "my" does what they expect.