TDL4 has asked for the wisdom of the Perl Monks concerning the following question:
Hello all dear monks,
I'm a Computer Science student, and I'm taking a Concepts of Programming Languages course.
I've been asked to write a report (In a group) detailing a language of my choosing, I chose Perl since I heard Larry Wall talk about the 5 languages everyone should learn about and Perl caught my attention.
I just thought I might find some help here regarding an overview of the language and maybe somewhat of an evaluation or cost considerations.
Just some headers or resources would be fine, I don't expect any one to write the report for me or anything ;)
Many a thank wisdom Perl Monks.
Re: Some Help for a Report About Perl
by Discipulus (Canon) on Nov 01, 2017 at 19:16 UTC
|
Hello TDL4 and welcome to the monastery and to wonderful world of Perl!
As incipit I must admit I'm not so qualified to answer you because I just know Perl and no other programming languages, so I miss the perspective.
So just some sparse hints for you, to take inspiration maybe.
Perl was designed (and it's actively maintained!) to Make Easy Things Easy & Hard Things Possible
This basic principle is a red thread in Perl history: Perl can easily vary from bash like scripting (on steroids), to be included in some pipeline of commands till big or enormous platforms (iirc the whole booking.com). Perl can produce GUI easily using Tk Prima or Gtk
It is a very high level language with a very high signal/noise ratio: it is very expressive and this is the good side of the medal of having a somehow scary appearence in it's syntax.
Perl has CPAN and this is very big plus: imagine a programming problem, I bet some solution is already done in CPAN: 193,966 Perl modules at your disposal is not taht bad. Perl has avery active community and many new and old projects are the top in their fields: Plack Dancer2 and Mojolicious for the web, MCE for parallel processing, PDL for scientifics, bioinformatics..
Perl is many time referred as a glue language: it's true! Perl can communicate with every part of an informatic system, can wrap almost anything, can report in many way.. This has a limit: perl is no good to write hardware driver. The reamining is enough.
Perl is probably the second best language to deal with UNICODE: not that is easy but this is not entirely a Perl's fault.. In addition Perl has the best regular expression implementation you can imagine: almost a language in the main one: powerful and terrificly fast (Note: the last paragraph was added while other monks were adding comment about regexes).
Perl does not force you to act it's way: the TMTOWTDI karma is always valid: with Perl you can program somthing similar to C or use full featured class aware systems, mimicry functional programming or just get the job done.
Get the job done.. yes with Perl you'll have a quick working solution very soon: then you can improve it (if it's worth to).
Perl has a lovingly error reporting system: this is big plus in short and long term. More: you can extend that error reporting and debugging system at your will. Perl itself poses no barrier to you: black and white magic are at your disposal if you need (symbol table and notably eval where you can watch at the Perl compiler from a Perl program)
Perl is no more the "Fashion language" it was in the end of the century, but still runs everywhere in old and new systems.
Perl is born in UNIX/Linux world but can run effectively on MS windows ( see strawberryperl.com or activestate Perl too) MacOS and other OSs.
Now some link: a must read is Modern Perl (free pdf) and the whole Modern Perl site (update: by chromatic who once said this) and for language comparison this one(2012) and TIOBE (2017).
Most well-known Perl-powered product? Why do people say 'Perl' is dead?!?! and Should I come back to Perl? are good nodes here at the monastery: I have other ones in my homenode (see also answer to Perl viewpoint from stackoverflowers very fresh one!) under the section Perl is dead infact Perl was given for dead many times but will probably dance on many other language graves.. ;=)
Finally only Perl has perlmonks.org !!
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
| [reply] [d/l] [select] |
|
| [reply] |
|
| [reply] [d/l] |
|
Thank you so very much dear sir, your link to the Modern Perl file is actually all I needed! wow quite the help this thread turned out to be! Thanks again.
| [reply] |
Re: Some Help for a Report About Perl (updated)
by stevieb (Canon) on Nov 01, 2017 at 19:00 UTC
|
Here are a few points off the top of my head. Most or all are opinion only, with perhaps little or nothing factual backing them up:
- it's open source and free, so no cost here
- Perl developers are in large decline since its hayday, so the cost of maintaining existing codebases or new code projects may/will be higher in this regard
- it will be much more difficult finding quality Perl programmers than it may other more cute/fad languages (Python etc). That said, Perl devs are Perl devs... most of the highly experienced ones don't jump from fad to fad, doing only a couple years in between moves (when they do move, most stick with Perl on the side)
- Perl is partially based on the C language, so experienced C devs can pick up Perl quite quickly
- Perl is a Do What I Mean language
- Perl's main slogan is TIMTOWTDI (There Is More Than One Way To Do It), meaning that it's one of the most flexible languages out there (at least all the ones that I'm fluent or partially fluent in)
- The, or one of the largest online databases of free, Open Source modules all in a single location, makes installing and using new APIs/functionality so simple even your grandma (or your GrandFather) could do it (CPAN)
- it's Perl, it's the best language ever written!
- it was designed by an expert linguistic, so the language is exceptionally easy to understand flow
About to start a meeting, so that's all I've got for now.
update: Added GrandFather in there, because, you know, he's a real edumicator here, and thought it fit (while replacing a brake line on one of my trucks of all things :)
| [reply] |
|
> other more cute/fad languages (Python etc).
Oh, that reads as weird name-calling there. Python was first released in 1991; Perl in 1987 - it's hard to believe that either can really be referred to as a "fad language" any more. Your point about the difficulty of hiring experience Perl programmers is fair, but you dilute it a bit here.
| [reply] |
Re: Some Help for a Report About Perl (Perl Culture and History References)
by eyepopslikeamosquito (Archbishop) on Nov 01, 2017 at 21:55 UTC
|
Others have discussed the Perl langauge in general.
Here I focus on Perl culture and history.
The Perl culture of having fun is what attracted me to Perl.
I found it so refreshing compared to the boring corporate IBM/Microsoft-dominated software engineering culture
that dominated my life back then!
In particular, I enjoy Perl golf, Perl obfu and Perl poetry.
To give you a feel for what these activities are about:
Some nodes that compare Perl with other languages you may know:
To learn more of the history of the Perl programming language take a look at:
See also:
Updated: Added more references.
| [reply] |
Re: Some Help for a Report About Perl
by BillKSmith (Monsignor) on Nov 01, 2017 at 20:09 UTC
|
One feature that distinguishes perl from most other languages is its powerful regular expressions. This alone can make it the language of choice for almost any text editing task. Unfortunately, this is probably the basis for most of the criticism that we see about perl's syntax. A poorly written regex can look like the work we expect from monkeys at typewriters.
| [reply] |
|
That's another absolutely huge one, and in fact, Perl has dictated its own widely-used standard: "Perl Compatible Regular Expression" (PCRE). I agree with the typewriter monkey if not used well.
One distribution I've contributed to a few times over the years is Email::Valid. Check out this regex that's part of it. By far, it is not poorly written, but in the past in a ticket or a patch, another contributor stated (paraphrased as I can't recall the exact wording), 'I'm not touching that regex; it's a thing that is made of nightmares' :)
Another thing, Perl is the "Practical Extraction and Reporting Language".
| [reply] |
|
| [reply] [d/l] |
|
|
| [reply] |
Re: Some Help for a Report About Perl (Readability vs Maintainability References)
by eyepopslikeamosquito (Archbishop) on Nov 02, 2017 at 08:30 UTC
|
Maintainability is the nebulous measurement of how easy it is to understand and modify a program.
Write some code. Come back to it in six months (or six days).
How long does it take you to find and fix a bug or add a feature?
That's maintainability.
Maintainability doesn't measure whether you have to look up the syntax for a builtin or a library function.
It doesn't measure how someone who has never programmed before will or won't read your code.
Assume you're talking to a competent programmer who understands the problem you're trying to solve.
How much work does she have to put in to understand your code? What problems will she face in doing so?
-- chromatic in Modern Perl ("Style and Efficacy" section)
Oh, one more thing.
Don't fall for the old chestnut that "Python is more readable than Perl".
Or that "Perl looks like line noise".
Instead, remind anyone who makes such a claim that Russian is "unreadable" if you don't know Russian.
Then further challenge them to explain how Python's magical powers of readability ensures that they:
- Make sound domain abstractions.
- Decompose their programs wisely into highly cohesive, loosely coupled modules.
- Choose descriptive, explanatory, consistent and regular names.
- Write useful comments.
- Minimize the exposure of implementation details.
- Avoid duplication (DRY).
- Don't use magic numbers in their code.
- Create interfaces that are: consistent; easy to use correctly; hard to use incorrectly; easy to read, maintain and extend; clearly documented; appropriate to audience.
- Write components that are testable in isolation.
- Establish a rational error handling policy and follow it strictly.
That is, "readability" is far less important than "maintainability" --
so that programmers who know the language can come
to the code later in its life and
understand its construction and intentions
and change it comfortably and confidently.
And writing "maintainable" Perl is just as easy as writing "maintainable" Python.
Update: Computer programming (wikipedia)
defines Readability as "the ease with which a human reader can comprehend the purpose, control flow, and operation of source code"
and further lists factors that affect it namely: following a consistent programming style (and naming conventions),
correct indentation, judicious commenting and wise decomposition.
Note that these important code qualities are essentially independent of the programming language being used.
References
References Added Later
| [reply] |
|
Quite so. It is always worth quoting from Ed Post:
the determined Real Programmer can write FORTRAN programs in any language.
I have seen this truism made real in more than one language as no doubt has everyone else who has been in the industry long enough. Thankfully there is not so much Fortranish Perl out there - it's probably the TIMTOWTDI which keeps them away.
| [reply] |
Re: Some Help for a Report About Perl
by soonix (Canon) on Nov 02, 2017 at 06:37 UTC
|
One distinguishing trait of Perl (I think this is unique in programming languages) is that Perl has context. Upon my first encounter with Perl (coming from languages with "context-free" grammars) I thought this were a design flaw, but it is intentional - Perl is designed after natural languages - and some of the advantages are described by chromatic in his book. The linked chapter also contains information on other points that make Perl stand out. | [reply] |
|
Agreed! As per the quotes below. :)
Pragmatics is a subfield of linguistics and semiotics that studies
the ways in which context contributes to meaning
-- Pragmatics (wikipedia)
Neither is the soul of Perl, which rests in the realm of pragmatics
-- Linguist Larry Wall (aka TimToady) in Re^2: What's wrong with Perl 6?
Perl has further been described as an "OO language", where
"OO" means, not "object-oriented", but "operator-oriented" --
as per the classic
Periodic Table of the Operators.
Note that Perl can easily support many more operators
than most conventional
programming languages because alphabetic operators in Perl (e.g. lt) are
easily distinguished from variable names
because variables must start with a sigil (e.g. $ or @ or %).
| [reply] [d/l] [select] |
Re: Some Help for a Report About Perl (One-liner References)
by eyepopslikeamosquito (Archbishop) on Nov 04, 2017 at 00:38 UTC
|
Another distinctive aspect of Perl worthy of mention is its support for one-liners.
I'm not aware of any other language that comes close to the power and convenience
of Perl when writing quick one liners from the command line.
Even people who switch from Perl to Python
still fall back on Perl when writing one liners.
Perl One-liner References
Some PM one-liner nodes:
Old Broken Links
See Also
Updated: Added extra references. Thanks Realbot.
| [reply] |
Re: Some Help for a Report About Perl
by ww (Archbishop) on Nov 02, 2017 at 22:00 UTC
|
As a latecomer to this party, I'm surprised that no one has mentioned this fact:
Perl has a cadre -- a large one -- of folk who really know the languaqe, and cheerfully share their knowledge without trolling newcomers.
viz: PM!
| [reply] |
A reply falls below the community's threshold of quality. You may see it by logging in. |
|
|