Re: Perl influences?
by merlyn (Sage) on May 05, 2005 at 11:01 UTC
|
I believe Perl predates nawk. In fact, I've claimed at least once or twice that I'm glad nawk (and gawk) were not readily available in 1987, or there might have been less pressure on Larry to write Perl in the first place.
From what I understand (although TimToady will correct me if I mess up here, perhaps), the problem Larry was trying to solve with awk involved stopping processing in one file to temporarily consult a second file (bug reports that refer to other bug reports). And that's what awk doesn't do, although I understand later awk versions handle fine. So, Larry was "forced" to write Perl, and create an entire industry and subculture as a result.
| [reply] |
|
| [reply] [d/l] [select] |
Re: Perl influences?
by blazar (Canon) on May 05, 2005 at 08:59 UTC
|
I've read on O'Reilly's History of Programming Languages that Perl derives from nawk and sh.
I know that this may sound a little too simple, but I'd like to check if this information is accurate, since I'd like to include this in a course material I'm producing.
Nah, it's not that simple! There are plenty of descriptions of the various languages that influenced the design of Perl in the many books about the latter...
However one nice thing about Perl is its nice and thorough documentation. And to excerpt from perldoc perl:
Perl combines (in the author's opinion, anyway) some of the best fea-
tures of C, sed, awk, and sh, so people familiar with those languages
should have little difficulty with it. (Language historians will also
note some vestiges of csh, Pascal, and even BASIC-PLUS.) Expression
| [reply] [d/l] |
Re: Perl influences?
by eyepopslikeamosquito (Archbishop) on May 05, 2005 at 12:56 UTC
|
From history.perl.org
here is an excerpt from the Perl 1.000 release notes of '87:
It combines (in the author's opinion, anyway)
some of the best features of C, sed, awk, and sh, so people
familiar with those languages should have little difficulty
with it. (Language historians will also note some vestiges
of csh, Pascal, and even BASIC|PLUS.) Expression syntax
corresponds quite closely to C expression syntax. If you
have a problem that would ordinarily use sed or awk or sh,
but it exceeds their capabilities or must run a little faster, and you don't want to write the silly thing in C, then
perl may be for you. There are also translators to turn
your sed and awk scripts into perl scripts. OK, enough hype.
Another piece of trivia: the initial release was delayed
until the awk to perl (a2p) translator was finished because
Larry felt Perl would not be well received without this vital
piece.
Of course, since that time, Perl has borrowed heavily from
other languages as well. And the tradition continues today in
the design of Perl 6 with a fancy name:
The Principle of Borrowing. :-)
| [reply] |
Re: Perl influences?
by jacques (Priest) on May 05, 2005 at 16:31 UTC
|
| [reply] |
Re: Perl influences?
by gam3 (Curate) on May 05, 2005 at 19:23 UTC
|
I think that there was some lisp influences as well.
I don't see much sh influence though.
Update: I see the influences now.
-- gam3
A picture is worth a thousand words, but takes 200K.
| [reply] |
|
| [reply] |
|
| [reply] |
|
| [reply] [d/l] [select] |
|
A few other sh influences (sorry if this duplicates a few others... I merely skimmed):
- The fact that it's a "script": there's no "main" function that has
to be declared and executed first
- The type of a variable is implicit in the variable name
- The quoting style for "this${var}that" (putting curlies around name as a delimiter when adjacent to more word chars"
| [reply] |
|
| [reply] [d/l] [select] |
|
I think that there was some lisp influences as well.
Notably, "map".
| [reply] |
|
I was under the impression that eval was one of the most lispish feature of perl.
"Most self-respecting scripting languages such as BASIC (some versions, anyway), Perl, Tcl, LISP, and Python have a feature that clearly sets them apart from systems programming languages like C: the ability to treat character strings as little programs."
Advanced perl programming, chapter 5"
| [reply] |
|
I don't see much sh influence though.
I can see many, though, and in addition to those pointed out by others it seems to me that sigils, which are by now so charachteristic (also) of Perl, have not been mentioned yet. But maybe they're inherited from something else - I'm not a language historian after all... oh and while we're at it, maybe it's worth reminding that their syntax is somewhat different in sh's, as they (limitedly) declinate there, as they do in tcl (IIRC).
| [reply] |
Re: Perl influences?
by Ben Win Lue (Friar) on May 12, 2005 at 08:46 UTC
|
I'm quite sure that Perl has lot's of influences. Fortran, LISP and Cobol (urg) have influenced any modern language more or less. Nobody can deny, that even an exotic language as Simula had a strong influence on Perl 5. And I think that neither Merlyn,Larry nor anyone else involved did any coding in Simula.
Even traces of Algol68 can be found in Perl (well err somewhere ... 8-})
| [reply] |