Why is Perl losing ground?

S

Stephen Poley

I have an irresitable urge to insert this quote here, from
linux/Documentation/CodingStyle. True, it's about C, but Perl has a lot
of C heritage:

| C is a Spartan language, and so should your naming be. Unlike Modula-2
| and Pascal programmers, C programmers do not use cute names like
| ThisVariableIsATemporaryCounter. A C programmer would call that
| variable "tmp", which is much easier to write, and not the least more
| difficult to understand.

I have an irresistable urge to point out that that is not a useful
variable name, given that all variables are temporary. The permanent
stuff is in files and databases after all. If you want a meaningless
name, you might as well use t. If you want it to have some small
mnemonic value, call it count.

Yup, arguing from authority is the last recourse of the ignorant...

Actually, I thought the last recourse of the ignorant was abuse...
 
G

G Klinedinst

Sherm Pendley said:
$_ : $ARG
$? : $CHILD_ERROR
$! : $OS_ERROR
$@ : $EVAL_ERROR
$$ : $PROCESS_ID or $PID
$| : $OUTPUT_AUTOFLUSH

sherm--

Thanks Sherm. That looks interesting, I will read up on it.

-Greg
 
E

Eric Schwartz

Sherm Pendley <[email protected]> wrote in message news:

Thanks Sherm. That looks interesting, I will read up on it.

Just be aware that hardly anyone uses those in practise, and it will
make your programs more difficult to maintain in the future (as an
otherwise experienced Perl programmer will hunt around forever to see
where the #($*&! $PID is defined, etc.). If you read the Camel book,
it has some mnemonics for the special variables, such as '$<' is where
you're coming FROM, '$>' is where you're going TO, and so on.

Learning the API will do you more good than learning 'use English;' in
the long run, I believe.

-=Eric
 
B

Bart Lateur

Eric said:
Just be aware that hardly anyone uses those in practise, and it will
make your programs more difficult to maintain in the future (as an
otherwise experienced Perl programmer will hunt around forever to see
where the #($*&! $PID is defined, etc.).

There's no need for that FUD, because that's what it is. If people see
that English has been used, then they should be aware of the chance them
having to look it up. It's the same as with any other module used.

The problem I'm having with the English names, is that despite being
easy to read, they're very hard to write... was it $INPUT_LINENUMBER or
$INPUT_LINE_NUMBER?
If you read the Camel book,
it has some mnemonics for the special variables, such as '$<' is where
you're coming FROM, '$>' is where you're going TO, and so on.

No need to read the Camel, as perlvar lists them too. And the English
names too.
Learning the API will do you more good than learning 'use English;' in
the long run, I believe.

That's what I do, I never use English.

Familiarity with the name of the special variable goes on par with
actual *use* of a variable. It's not enough to know what $| is for, you
should also know how to use it. It's the same with any other of these
special variables.
 
U

Unknown Poster

Beable van Polasm said:
Have you tried using one of these modules: Class::Struct,
Class::MethodMaker, or Class::MakeMethods?

This is a good example of why Perl is losing ground as object-oriented methods
become more popular. There are simply too many approaches to object-oriented
programming. In addition to these, and other similar modules that are
sure to come, there's autloading, closures, "use fields", etc. So, before
you can even start, if you want to be thorough, you have to investigate
all these approaches and decide on some criteria that a choice will be
made on.

Then, there's the problem of integrating your OO code with that produced
by another team /department / company. The methodology will more than likely
be so different as to make this task a real bear.
 
B

Beable van Polasm

This is a good example of why Perl is losing ground as
object-oriented methods become more popular.

Is it? Have you done a survey?
There are simply too many approaches to object-oriented programming.
In addition to these, and other similar modules that are sure to
come, there's autloading, closures, "use fields", etc. So, before
you can even start, if you want to be thorough, you have to
investigate all these approaches and decide on some criteria that a
choice will be made on.

OH NO! You might have to make a DECISION! Programming was RUINED!
Then, there's the problem of integrating your OO code with that
produced by another team /department / company. The methodology
will more than likely be so different as to make this task a real
bear.

Uh huh. Have you ever looked at CPAN? There are many object oriented
Perl modules on there, and it is really quite easy to integrate them.
I haven't noticed any integration problems caused by different
methodology. For example, I can easily integrate XML::Writer with
IO::File. Why should I even care what methodolgy the authors used?

When you get right down to it, you have objects which contain data,
and supply methods you can use to operate on the data. Who cares what
the author does inside the black box of the classes they write? What
difference does it make if they used Class::MethodMaker or
Class::MakeMethods?


--
 
S

Sara

:It HAD to happen sooner or later. Look at every programming language
:ever . Each has an effective lifecycle. Who uses FORTRAN now? COBOL?
:even c? Perl will look pretty much like COBOL in 20 years.

http://msnbc.msn.com/id/4147164/
MIT Technology Review
10 technologies that refuse to die (Feb 4, 2004)

The last one on the list is Fortran.

Oh yes BIG SURPRIZE there are legacay systems out there. Wow.. That's
a weak argument at best.

:I've been an industry
:developer now for over 20 years, and if a language serves my
:employer's needs for 5 years thats a long life!

It must be nice to be able to rewrite all those programs every 5
years.

My code never needs rewriting. But what IS NICE is to do all of the
NEW development, on the latest tools and platforms. I guess you're a
"code maintainer" so yes, you probably better stick to legacy systems.
Keep that FORTRAN 77 book handy you're gonna need it!
 
S

Sara

Tassilo v. Parseval said:
Also sprach Sara:


Surely there must be some language that takes Perl's place then, no?
I don't yet see which one that would be. Ruby is often mentioned but
when being honest, it isn't so very different from Perl. At least it's
not a radically different approach to programming which I would expect
the new future language to offer.

I rather predict that all the major languages nowadays - C++, Perl,
Ruby, Python, Java and maybe more - will still be around years from now.
As time flies by, these languages do not rest but also evolve. I suspect
that Perl6, once out, will be fresh enough to survive another ten years
with ease.

As for those allegedly dead languages you mentioned: FORTRAN is
certainly still widely used, and rightly so. With the increase in
computational power of computers though its market might shrink a
little. But I am sure people said that already fifteen years ago and
were proven wrong.

C is out of the question anyway. With its vast support for almost every
conceivable platform, it must be the most portable language of all. That
means people will continue using it for writing operating systems,
compilers and interpreters for other languages. Eventually it could
be replaced by C++, but this is not going to happen before it is more
widely supported.

The real change will happen when a completely new system of computers is
invented (think Quantum Computers as a placeholder for such a system).
But this would mean the death of not just Perl but any language as we
know them right now.

Tassilo


The point isn't that languages go to ZERO use. Undoubtably there are
still poor programmers out there flipping 1 and 0 toggles on a PDP-8.
And people use FORTRAN. And COBOL. and c. Less every year, but of
course the number isn't zero. Never said it was.

An no I'm not kidding that c is virtually dead as a new development
tool. I attend Programming conferences all over the country and I
can't remmeber the last time anyone even mentioned it. What company
would christen a new project in c?? C'mon get your head out.

If you want realtime stats on PROGRAMMING LANGUAGE usage, go to DICE
or a similar site and search on keywords. Perl's stats are actually
disappointing, as are those for java since they are through the roof.

But my point still stands, that developers always need to be looking
at what's next language wise. Maybe in your companies things move
real slowly and you can make a career on FORTRAN, but the hi-tech's
would leave you in the dust. I'm still employed while I can point to
dozens of ex-collegues who are in other vocations now for the simple
reason they tried to make a career out of one or two tricks in their
programming portfolio. The hard truth is that it doesn't work.


I guess the argument is that there will always be code to maintain.
And that's true. If you want to be a code maintainer have at it.
Someone has to do it.
 
W

Walter Roberson

|[email protected] (Walter Roberson) wrote in message |> In article <[email protected]>,

|> :I've been an industry
|> :developer now for over 20 years, and if a language serves my
|> :employer's needs for 5 years thats a long life!

|> It must be nice to be able to rewrite all those programs every 5
|> years.

:My code never needs rewriting.

And your employers never want to use that previous functionality in
whatever new language they are using this year? Yes, you might have
well defined interface definitions and there is [sometimes] the possibility
of cross-language linking of libraries, but cross-linking breaks down --
you might be able to use it for the next language, but you probably can't
use it for the language after that.

And compilers and coding standards change -- even K&R spec C code won't
necessarily compile with ANSI C, let alone C++ or C89 or C#. So if you
are still trying to use the old code a decade from now, chances are it will
need to be tweaked.

:But what IS NICE is to do all of the
:NEW development, on the latest tools and platforms.

The translation of that that is coming out this end is that
you don't work on any programs that are *worth* preserving into the next
Strategic Plan.

:I guess you're a
:"code maintainer" so yes, you probably better stick to legacy systems.
:Keep that FORTRAN 77 book handy you're gonna need it!

My main work is as a systems administrator at an R&D site. Some of our
programs take more than 5 calendar years to develop (25+ person-years
easily.) If we knew ahead of time exactly what all the necessary
interfaces were going to be, then we probably wouldn't need to do the
research.


:My code never needs rewriting.

I seem to be having difficulties here believing that you always
anticipate all the ways your code might get used, and put in all the
appropriate hooks and configurability. Would you care to let us in on
the little matter of which models of "dark energy" computing your code of
1984 was written to support?
 
W

Walter Roberson

:But my point still stands, that developers always need to be looking
:at what's next language wise. Maybe in your companies things move
:real slowly and you can make a career on FORTRAN, but the hi-tech's
:would leave you in the dust. I'm still employed while I can point to
:dozens of ex-collegues who are in other vocations now for the simple
:reason they tried to make a career out of one or two tricks in their
:programming portfolio. The hard truth is that it doesn't work.

I work in scientific research. When no-one in the world knows how to
solve a particular problem, it isn't because we just haven't selected
the right next-generation programming language. A programming language
is means for -expressing- ideas, not a means for -creating- ideas.

If we come up with a (relatively) simple, 95% accurate test for
detecting [say] bowel cancer, then do you really think that no-one
is going to be interested just because we wrote the tools in C instead of
in C#? The programming language probably doesn't even get mentioned in
our publications in Science, Nature, AJM, and so on.
 
T

Tassilo v. Parseval

Also sprach Sara:
The point isn't that languages go to ZERO use. Undoubtably there are
still poor programmers out there flipping 1 and 0 toggles on a PDP-8.
And people use FORTRAN. And COBOL. and c. Less every year, but of
course the number isn't zero. Never said it was.

An no I'm not kidding that c is virtually dead as a new development
tool. I attend Programming conferences all over the country and I
can't remmeber the last time anyone even mentioned it. What company
would christen a new project in c?? C'mon get your head out.

Precisely those companies that have no other choice. I wonder whether
you ever attended a conference where not just computer scientists meet
but also engineers. C is an industry standard, nothing less. I know only
of two languages that could realistically replace it in these fields:
This is FORTRAN and, to a very limited degree as of now, C++. Not one of
the hip languages is among them.
If you want realtime stats on PROGRAMMING LANGUAGE usage, go to DICE
or a similar site and search on keywords. Perl's stats are actually
disappointing, as are those for java since they are through the roof.

Only that dice.com or similar sites aren't even remotely representative.
Essentially anything that requires a bit more specilization is left out.
It only covers the rather dense market of mainstream programming. And
this market is already packed with millions of mediocre programmers,
mostly Java since it can be used for those non-demanding tasks.

But when I look at some of the most recent developments, then
interestingly enough I see them often in conjunction with C and
FORTRAN. For instance parallel programming. The relatively new MPI-2.0
standard was explicitely designed with FORTRAN in mind. Java on the
other hand doesn't yet even have a proper and complete implementation of
MPI-1.2. Neither has C++, by the way.
But my point still stands, that developers always need to be looking
at what's next language wise. Maybe in your companies things move
real slowly and you can make a career on FORTRAN, but the hi-tech's
would leave you in the dust. I'm still employed while I can point to
dozens of ex-collegues who are in other vocations now for the simple
reason they tried to make a career out of one or two tricks in their
programming portfolio. The hard truth is that it doesn't work.

I'd say you just see a very tiny fraction of the real picture. The truth
is that very many tasks requires these languages that are said to have
died already. And as long as processors, micro-controllers and clusters
cannot program themselves (and I am not very worried that they'll learn
that within the next two decades), the market appealing to programmers
of 'ancient' languages is still very much alive.
I guess the argument is that there will always be code to maintain.
And that's true. If you want to be a code maintainer have at it.
Someone has to do it.

It's not merely about code to maintain. It's also about new code to
develop.

Tassilo
 
M

Martien Verbruggen

On 23 Feb 2004 12:59:37 -0800,

[snip of earlier discussion that's not relevant to this post]
The point isn't that languages go to ZERO use. Undoubtably there are
still poor programmers out there flipping 1 and 0 toggles on a PDP-8.
And people use FORTRAN. And COBOL. and c. Less every year, but of
course the number isn't zero. Never said it was.

No. But you seem to be saying that the number approaches zero, or
becomes negligible, and that's what people are disputing.
An no I'm not kidding that c is virtually dead as a new development
tool. I attend Programming conferences all over the country and I
can't remmeber the last time anyone even mentioned it. What company
would christen a new project in c?? C'mon get your head out.

If you base your opinion on "programmer conferences" then your opinion
is not based on real world experience, and severely skewed. Those
conferences generally center on whatever is "new" or "hot" or "sexy",
or whatever terminology you want to use.

In the real world, there are large amounts of code that took years and
years to develop, and that are still maintained.

Especially Cobol and FORTRAN have a large market-share there. There
are large amounts of _new_ code written in FORTRAN every day. The
language is extremely easy to use and powerful for
computation-intensive tasks, and sports a very large number of
libraries and tools that mathematicians, astronomers, fluid
dynamicists and other scientists can use, and therefore do use. From
my experience, FORTRAN is one of the most widely used languages in
computationally intensive sciences.

C is a language that is still incredibly hard to beat when it comes to
speed, tersity, and small footprint. Especially in the world of
embedded devices that makes it a very well-used language. Major
operating systems in the world are written in C, and are maintained in
C. Many freely available libraries are written in C. A lot of
commercial software is written in C. many real-time applications are
written in C. The comp.lang.c newsgroup is a very busy group. C is not
dead by a long shot.
If you want realtime stats on PROGRAMMING LANGUAGE usage, go to DICE
or a similar site and search on keywords. Perl's stats are actually
disappointing, as are those for java since they are through the roof.

If you want to argue that Perl's usage is on the demise, which seems
to be what started all this, then do so. Don't try to extrapolate from
other languages, especially if you get your facts wrong, and you base
your experience on marketing-driven conferences.
But my point still stands, that developers always need to be looking
at what's next language wise.

I don't agree. Developers should look at which language is most
appropriate to the task at hand, and which development fits in best in
the already existing framework that the code needs to operate in.
You'd be a pretty stupid developer if you decided to develop a new
application for your company in a language when all other code in your
company is written in another language. You'd be pretty stupid if you
tried to write a real-time application, or a computationally intensive
application in Perl. You'd be stupid if you wrote an application that
requires a small memory footprint in Java or Perl. it would probably
not be the right choice to write an application that requires a lot of
text processing in C or Java.

A language is just a language. The compiers or interpreters that come
with those languages give the whole environment properties that you
select for. Always picking the newest and hottest language for
development is as stupid as never looking at new languages that come
along. You simply pick what's most appropriate, and what fits in best
with what's already there.
Maybe in your companies things move
real slowly and you can make a career on FORTRAN, but the hi-tech's
would leave you in the dust. I'm still employed while I can point to
dozens of ex-collegues who are in other vocations now for the simple
reason they tried to make a career out of one or two tricks in their
programming portfolio. The hard truth is that it doesn't work.

This may come as a shock to you, but _most_ companies move really
slowly. If, as a company, you actually do write code yourself, and you
have a serious code base, what exactly would be the business case to
rewrite, test and debug all that code every time a new fad language
comes along? Now and again, an opportunity arises for companies woth a
serious code base to rewrite it all, and sometimes companies do.
However, this invariably requires a large investment, and the returns
on that investment need to be apparent to the beancounters.

Small companies, with little code and small development groups, are
more likely to now and again change the platform they work with,
simply because the dynamics of the IT economics in a company like that
are entirely different.

Apart from that, there is risk management to take into account.
Whenever software failure can cost lives, or whenever it controls
money, the amount of testing and quality control easily costs many
times more than the actual development time. Testing and QA are much
less sensitive to the language used than development time. The
business case for throwing away well-tested code for a new code base
that needs to be tested from scratch is going to be very shaky.

Again, you are basing your opinion on a small subset of the real
world, instead of realising that there may be a large world outside of
your experience that you simply don't know about (and you don't seem
to know about it, judging by your assertions here).
I guess the argument is that there will always be code to maintain.
And that's true. If you want to be a code maintainer have at it.
Someone has to do it.

That is one argument, but the argument is also that there is a lot of
new development in languages that you call obsolete, because other
people use different criteria to choose their language than you do.

The "newness" of a language is not something I've ever heard a good
programmer or IT manager use as a criterion for selecting it. I've
seen bad IT managers and programmers select new languages based solely
on marketing hype, and I've witnessed several projects go down the
gurgler because of that.

Martien
 
M

Malcolm Dew-Jones

Sara ([email protected]) wrote:

: An no I'm not kidding that c is virtually dead as a new development
: tool. I attend Programming conferences all over the country and I
: can't remmeber the last time anyone even mentioned it. What company
: would christen a new project in c?? C'mon get your head out.

http://sourceforge.net

claimed hosted projects: 76,503

browse by language, top three languages by my count

C++ 12,828 projects
C 12,821 projects
Java 11,270 projects

and next largest are PHP (8,484), Perl (5,343), Python (3020)

Glancing at the project list for C, there seem to be lots of relatively
recent projects in the system, not just legacy projects moved into source
forge.

Most code I have worked with are utility level programs, not large scale
applications, large scale application may be different, but C seems to me
be pretty much as popular as ever as a complied language for small scale
applications (i.e. utilities).
 
M

Matt Garrish

Walter Roberson said:
:My code never needs rewriting.

I seem to be having difficulties here believing that you always
anticipate all the ways your code might get used, and put in all the
appropriate hooks and configurability. Would you care to let us in on
the little matter of which models of "dark energy" computing your code of
1984 was written to support?

Come on now, you shouldn't be speaking so lowly of a person working on 10
masters and 15 PhDs at the same time only to be unemployed in two years.
They surely have trolls at the Winnipeg zoo. Quit spending all your time
looking at the Pooh bears... : )

Matt
 
J

John W. Kennedy

How does that reduce the popularity of the code. I would counter
argue that the Perl is the most standard languge I know of since once
I've written the code I'm guaranteed it will work the same
everywhere.

Not altogether. There are nonportable Unixisms, and the question of
word size is ignored.

--
John W. Kennedy
"Those in the seat of power oft forget their failings and seek only the
obeisance of others! Thus is bad government born! Hold in your heart
that you and the people are one, human beings all, and good government
shall arise of its own accord! Such is the path of virtue!"
-- Kazuo Koike. "Lone Wolf and Cub: Thirteen Strings" (tr. Dana Lewis)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top