Re: Perl IS a programming language, right?
by mirod (Canon) on Dec 05, 2001 at 18:18 UTC
|
Basically a programing language is whatever you define as a programing language. I don't think there is any standard definition of what it is.
So Perl is certainly a programing language. What you friend might be refering to is that some, amongst which some prominent (ex-)members of the Perl community, have problems with the fact that there is no formal definition of Perl: the language is defined as "what the perl interpreter can run". Which means that there is no single document describing exactly and completely the language, and (more annoyingly) that the language can (and does) change with each new version. This is seen as heresy by "formal computer scientist". It violates all the supposedly good rules of software design.
My take is that this is both accidental and deliberate, at least that Larry (and others, me for example) is perfectly happy with it: Perl behaves and evolves like a natural language (have you ever seen a formal definition of English? I haven't either). The fact that it is not designed a-priori allows for more room to evolve, with the community and the coders using p5p to solve problems when they arise and not beforehand. This process lets us find the best (for some value of best that takes into account DWIM and backwards compatibility) way to incorporate improvements to the language. Plus we can include new features without having necessarily sorted them out completely, and wait for user feedback to complete the implementation.
But I realize this can be unsettling for people used to reading the BNF of the language they use.
| [reply] |
|
|
To go further with this idea ...
Most computer languages (or, rather, every one except those derived from Perl) ... they have a formal specification. That specification (supposedly) goes through a number of iterations and is supposed to be proveable at the end. There is a set of algebraic things a computer language is supposed to be able to do/fit into. And, pretty much all the non-Perl-like languages can.
Perl wasn't developed in a university, though. It was developed as a way for one man to do what he needed to do. Sed, awk, and sh were also developed this way, coincedentally. The only difference between awk and Perl is that Larry didn't realize he wasn't allowed to develop a programming language without a formal specification. So, he did. :-)
You could do a formal spec on Perl. But, it might not be very consistent. I think there will be a formal spec for Perl6, though. (Reading some of the Apocalypses seems to indicate that to me.) Larry et al seem to be going towards cleaning up a number of the holes in the language, which is a good thing.
------ We are the carpenters and bricklayers of the Information Age. Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
| [reply] |
Re (tilly) 1: Perl IS a programming language, right?
by tilly (Archbishop) on Dec 05, 2001 at 20:36 UTC
|
Does it matter if Perl has a formal spec? Many languages don't (eg Ruby). Many that do now, did not at one point (eg C++). A few had formal specifications from day 1, but they tend to be "written by committee" and hence not nearly as much fun (eg Ada, Java).
Tell your friend this. A programming language is a language you can write computer programs in. Perl is by that measure very definitely a programming language.
If you want to upset him a bit, you can tell him that if he thinks that Perl can't be algebraically defined then he clearly doesn't think very well. Perl has an implementation in C, and if you wanted to turn that C implementation into a formal description of exactly how the perl interpreter works, you could. The description might be rather verbose, but any particular version of Perl has a perfectly precise definition.
Now let's be more serious. There is a good chance that Perl 6 will wind up with a formal spec. There are reasons to want one. The following discussion gives several of them. Going the other way, when people write specs too early they get stuck with their first bad ideas. I think that Perl has benefited from Larry Wall being able to rethink at least some of his... | [reply] |
Re: Perl IS a programming language, right?
by stefp (Vicar) on Dec 05, 2001 at 20:24 UTC
|
Probably your friend meant by "language algebrically defined" is that it has a real formal specification
in some formal language like Z notation and that you can prove that an implementation
is conformant to that specification, and eventually prove
some strong properties about programs written in that language.
Also specifications written in plain English are ambiguous
but generally more understandable than any strict formalism. Read the definition of natural integers in
terms of sets, and you will see what I mean :)
I don't think any significant language useful in the real
world will come close to that anytime soon. This is a worthy and necessary goal but that
also can degenerate in pointless and pedant formalism like some
works in mathematical foundations.
Many languages come with a test suite though. But how can one
prove that a test suit is comprehensive enough so that two
conformant implementations will behave identically in all cases?
Perl has a significant test suite too. One advantage of perl is that it has a unique implementation unique modulo platforms. It evolves
over time but perl has a very good history of backward compatibility.
-- stefp | [reply] |
Re: Perl IS a programming language, right?
by stefan k (Curate) on Dec 05, 2001 at 19:14 UTC
|
I don't see any goods in looking at the specification of a language when choosing your weapons. One'd better see what other coders could do with a language and maybe have a look at how easy it was achieved to decide which one to take. Thus I'd rewrite your question as What powers and what flaws do I get from which programming language?
As for Java I wouldn't take any statement in the direction of clean design, portability and other things from a JavaCockey for serious if I look at the flaws the language already piled up in so few years of existance compared to the lifetime of other languages I don't want to start a flame war here - I simply don't like the language. There is no reason at all to take me for serious here :-)
I'm not really a CompSciProfessional, I'm just argueing from the heart, and many real professionals always come down to (common) lisp if it comes to clean everything.
I am quite happy with perl (just as I am with ruby ;-) - it did many jobs for me, with or without specs. Just my TwoCents...
| Regards... |
Stefan
|
|
you begin bashing the string with a +42 regexp of confusion
|
| [reply] |
|
|
..see what other coders could do with a language and maybe have a look at how easy it was achieved...
That way lies Visual Basic-dom.
Seriously, though, ++stephan.
dmm
Just call me the Anti-Gates
| [reply] |
(jeffa) Re: Perl IS a programming language, right?
by jeffa (Bishop) on Dec 05, 2001 at 21:01 UTC
|
For some reason, the Java mindset and Perl mindset collide
frequently. I hope your friendship is not compromised over
a debate about the two programming languages.
I was taught that any language that is
Turing-Complete is a programming language.
XML is not Turning-Complete - hence it is not a programming
language(although
TMML is).
Java and Perl are both Turing-Complete, but that's
pretty much where the similarity stops.
Next i suppose we will start debating about compilation
vs. interpretation ... but i think it really boils down to
personal taste.
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)
| [reply] |
|
|
For some reason, the Java mindset and Perl mindset collide
frequently.
Could it be that they're both used for web programming (CGI vs. Servlets/JSP/EJB, et al)?
Next i suppose we will start debating about compilation
vs. interpretation ... but i think it really boils down to
personal taste.
Don't get the Java guys started ... They live in a doubly-glass house: not only is Java strongly typed (frequently necessitating lines and lines of code to do what can be done in Perl in several or less), but it is BOTH compiled AND interpreted (unless you run on a machine with byte-codes as its machine language, in which case it's still compiled).
Don't get me wrong; I LOVE Perl and Java. My philosophy is "whatever works"; sometimes perl makes sense, sometimes java, JSP or EJB (and sometimes even -- gasp! -- ASP). When any one makes as much sense as the next, then I tend to choose Perl, just because of the shortened development time. And in that (personal taste), I think we probably agree.
dmm
Just call me the Anti-Gates
| [reply] |
|
|
It makes sense that perl and Java should collide
frequently. They 'feel' quite different to me on
so many levels. In perl, I feel closer to the computer.
I also feel I have more direct control over the data;
perl has such a rich set of data manipulators, I feel
numbed (encapsulated?) when I'm working in Java.
In Java, I feel like my head is filled with helium.
We code in the stratosphere, and implemented patterns
feel very theoretical. I can get lost in the abstractions.
With perl, I can get lost in the syntax, not the abstractions.
Does this make any sense?
I think the best way for me to describe Java vs. perl
programming for me is this: in Java, there's probably
only one *best* way to do something. In perl, there
are many ways of doing something, depending on what you
know how to do and what you really want. It's an
embedded dynamism that makes perl very flexible.
Rob
| [reply] |
|
|
The very flexible nature of Perl is both it's boon and it's
bane when compared to Java. True, Perl might be better
suited for small tasks and Java better for large projects.
Type safety is a must when dealing with large teams of
programmers (and have the nay-sayers even seen
Class::Contract?)
, but what most fail to understand is that once
you strip away your frameworks, environments, and
containers, what is left? Data munging. Perl is
quite good at that, better than most.
The idea of a programming environment independent of
language is quite appealing to me and
others.
They just don't want Perl to be allowed to play in
the sandbox.
What i don't get is, what is so threatening about Perl?
Why not use C# or Java to contain Perl code? Sounds like a
powerful combo to me, because both languages lack Perl's
raw munging ability. Are there any other languages that
provide autovivification besides Perl?
And on a sad note - i recently found myself in an argument
with an old friend regarding C#. After he insulted me (and
this site), i decided to end our 7 year friendship. Sad. I
actually think he was simply trying to lure me into working
with him at MicroSoft, but he chose to badger me instead of
politely inquiring.
My lesson? Just say 'no thanks' and move on.
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)
| [reply] |
|
|
Re: Perl IS a programming language, right?
by George_Sherston (Vicar) on Dec 05, 2001 at 19:36 UTC
|
I agree with sibling monks who say it's not so important what you call it but whether it does the business. Perhaps Perl isn't a programming language. Perhaps it's not even, speaking technically and precisely, a language at all. But it's what everybody uses to do stuff.
When I was in merchant banking the traders had a phrase they used to put the people from economic research in their place. The researchers would go to the morning meeting and say "because of fundamentals this should go up and this should go down". Then the traders would ignore their advice. At the end of the day the traders would say "You were right: but you lost money".
§ George Sherston | [reply] |
Re: Perl IS a programming language, right?
by dws (Chancellor) on Dec 06, 2001 at 03:20 UTC
|
... I didn't wanted to go any further with this talking to him, since he was becoming very annoying and cocky and I was getting pissed off.
This is an old debating trick. If you look for it you'll see it in all sorts of forms. The basic form is
A isn't a real B because of X
where X is usually something vague, obscure, or ill-defined. If the target of this technique (i.e., you) is embarrased about the prospect of seeming ignorant about X, then the burden of proof shifts from the claimant to the target.
Nine times out of ten, countering with "How do you justify X as a criteria for being a B?" will make the claimant back down or go away, though you have to watch out for parting shots that attempt to paint you as ignorant. If they don't back down, you can often navigate them into an increasingly narrower definition of B.
Try this:
"Tens of thousands of professional programmers use Perl every day. They think that it is a programming language, and they are getting real work done with it. If, for one example, the census department is happy crunching information using a non-algebraicly provable language, what does that say about the appropriateness of 'algebraicly provable' as a criteria for distinguishing what is and what is not a programming language?"
| [reply] |
|
|
You make a good point. From whose point of view is perl not a language ?
From my point of view and thousands of others who use perl every day to write computer programs, I say it is!
From a academics point of view perhaps not. But from their point of view perhaps Java isn't either ? Has anyone defined a axiomatic symantic for Java and used it to prove it's correctness ?
I guess it comes down to whose opinion you value more.
--
Nic
| [reply] |
Re: Perl IS a programming language, right?
by Beatnik (Parson) on Dec 05, 2001 at 20:02 UTC
|
I personally don't know any other non-specific block of interpretable data that comes so close to a spoken language (in general) than Perl. That doesn't make it a programming language per se but to define a programming language, one should define programming properly. Code wars are fun but I doubt this is the place to do it. Maybe the Java programmer is plain jealous? Like Microsoft claiming Linux isn't a threat to their marketshare.
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur. | [reply] |
|
|
| [reply] |
Re: Perl IS a programming language, right?
by chromatic (Archbishop) on Dec 06, 2001 at 06:55 UTC
|
Alright, here's a simple algebra for Perl. Use the word 'heuristics' to be more accurate. Say 'secret chant of the Perl cabal' if you want to invoke raw chaos. There is no cabal:
- Larry is always right.
- If Larry changes his mind, see #1.
- Breaking backwards compatibility to add a feature is ungood.
- The pumpking is always right, unless superceded by rules #1, #2, and probably #3.
- The module owner is always right, unless superceded by rules #1, #2, #4, and probably #3.
Those aren't very good rules. Good thing there's no cabal. | [reply] |
Re: Perl IS a programming language, right?
by Anonymous Monk on Dec 05, 2001 at 21:01 UTC
|
| [reply] |
|
|
| [reply] |
Re: Perl IS a programming language, right?
by runrig (Abbot) on Dec 06, 2001 at 00:45 UTC
|
| [reply] |
Re: Perl IS a programming language, right?
by mitd (Curate) on Dec 06, 2001 at 15:07 UTC
|
Your friend once again demonstrates that certain things we learn in school are best quickly forgotten.
I have been programming for over 20 years. I have used dozens of computer languages. I can only tell you two things, I prefer to make love on a soft bed and I prefer to program in Perl. I also program in Java, but then once, in my youth, I made love on a coffee table.
mitd-Made in the Dark
'Interactive! Paper tape is interactive!
If you don't believe me I can show
you my paper cut scars!' | [reply] |
|
|
This may seem a little odd, but what is it between Java and Perl? I happen to progrram in both and love them dearly - I use Java to make happy little web-based interfaces, 3d graphics, serious OOP stuff and do complicated geometric type stuff - calculating 3d lines and their ilk. In those cases I find having the typed variables in Java to be immensely useful. However, I handle all my CGI and file stuff with Perl. Anything that has anything to do with string handling goes straight to Perl. I'm never in the position where I have to ask myself 'Do I need Java or Perl now?'. Heck, I don't even know how to use Java's CGI elements - does Java have CGI elements?
For the record, Perl is most definitely a programming language, at least by my definition.
All conditionals must use a if (condition) {action} syntax.
I know it's a little dumb, but it excludes Virus Builder and Virus Builder Script, so it makes me feel good :)
Cestus
Microsoft and Shinra are the same. They're both killing the planet
| [reply] |
|
|
Hey, the coffee table is just a matter of personal style. Or is that an implimentation detail?
| [reply] |
|
|
| [reply] |
Re: Perl IS a programming language, right?
by andye (Curate) on Dec 05, 2001 at 23:21 UTC
|
| [reply] |
|
|
| [reply] |
Re: Perl IS a programming language, right?
by Dogma (Pilgrim) on Dec 06, 2001 at 11:39 UTC
|
If Perl isn't a language then I guess that means Java isn't a bloated, slow, and horrid memory waster. IMHO - static languages aren't nearly as usefuly a dynamic non-languages like Perl.
Academic types love to argue that they are 'RIGHT' or 'CORRECT' and everything else and one are wrong. The greatest strength of perl is that it has been expanded to do things that people really want to do. Perl6 will straiten out the few inconsitances but we've learned by trail what and HOW people want to program. Of course almost all widely used languages grew up in the wild. C, C++, Perl, etc all grew up out of the need to get something done. I think the Java people like to bitch because they are used to a basic OO principal being deep throated on them all the time and they get scared when it's not there. I mean if that pretty IDE doesn't fill in all the possible methods when I press period how am I supposed to program?
Java = Those kids that didn't color outside that lines.
Perl = Those kids that didn't color on the paper but instead the desk (the teachers desk) and were smart enough not to get caught. | [reply] |
|
|
Heh. That post was written by Dogma ... *laughs* I hope I'm not the only one who sees the irony in that!
------ We are the carpenters and bricklayers of the Information Age. Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
| [reply] |
Re: Perl IS a programming language, right?
by petral (Curate) on Dec 06, 2001 at 00:25 UTC
|
Your friend is absolutely right!  Calling perl a programming language is like calling emacs a word processor.  Perl is a collection of tools for getting things done on a computer.  It uses language to refer to said tools.  In that sense it is a language with which to program computers which I suppose is where the confusion creeps in.  But to call it a computer language as if it were like one of these algebraically defined Computer Languages is a canard which should not be tolerated.
  p | [reply] |
|
|
*blinks* So, 90% of all C++ programs aren't really using C++ cause all they reference are class APIs? What about all those programs using X that never actually do anything but create X objects and an event processor?
Perl can be algebraically defined. No-one's ever bothered to do it. But, that doesn't mean it isn't algebraically defineable! Anything that's Turing-complete (which Perl is) is algebraically defineable.
------ We are the carpenters and bricklayers of the Information Age. Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
| [reply] |
Re: Perl IS a programming language, right?
by rje (Deacon) on Dec 06, 2001 at 03:57 UTC
|
Sounds like this guy is casting about for reasons to
knock perl.
"I declare a holy war!"
Seriously, though, let me take a tangent...
I've found myself losing my cool when pythoners scoff
at perl's tendency toward language sprawl and the
typical neophyte's "write-only" perl scripts. If I
knew real, practical arguments for or against python
compared with perl I'd feel a lot better.
What are the real issues here? Is this guy concerned
with portability -- because that's all I can see being
potentially bad about an undocumented interface...
I guess your associate could be equivocating, if he's
implying that perl isn't useful just because it doesn't
have something theoretical rather than practical...
Rob | [reply] |
Re: Perl IS a programming language, right?
by drifter (Scribe) on Dec 06, 2001 at 06:52 UTC
|
Ok I'll try not to stick my neck deeper to that "Holy war"...
I'd just like to point out that even as I get most stuffs done with Perl,
not all things can be done that way.
Perl is a very good tool for anybody who can use it, but
it's not "the only language".
Eg. I was once in a project that included threading and speed
was essential, so it was clear from the beginning that we
just could not do it with Perl (Perlthreads, that's another "holy war")
so we chose C++.
Personally I don't like Java, but that's just my optinion. | [reply] |
Re: Perl IS a programming language, right?
by herveus (Prior) on Dec 06, 2001 at 21:05 UTC
|
Howdy!
"He is a Java programmer. I agree that Java is very powerfull and all that stuff, but does he have a point?"
Well, yes, he does have a point...on the top of his head.
Clearly your "friend" was not interested in a discussion; he was just trying to "score points". You don't have to
play along in his game...
yours,
Michael | [reply] |
Perl IS a *working* language...!
by chaoticset (Chaplain) on Dec 12, 2001 at 03:50 UTC
|
A good point about English was made earlier. Ask him to speak in an algebraically defined language and watch his smirk vanish.
Realistically...I think the algebraic definition of perl exists but cannot be derived, due to the fact that it's an enormous cross-referencing of several extremely complex human systems. ((LarryWall) * (DamianConway) * ... ) = (perl)
Explain that to your friend, and tell him that his limited 'programming languages' are too simple for you. :)
-----------------------
You are what you think. | [reply] |