22 Replies - 2184 Views - Last Post: 20 August 2007 - 03:43 AM
#1
Is PHP Really a Programming Language?
Posted 04 August 2007 - 09:20 AM
- no machine code generated (code is parsed not compiled)
therefore...
- it's executed instantly
- it's actually written in C (a programming language written in a programming language?)
Replies To: Is PHP Really a Programming Language?
#2
Re: Is PHP Really a Programming Language?
Posted 04 August 2007 - 09:50 AM
JLeo, on 4 Aug, 2007 - 09:20 AM, said:
- no machine code generated (code is parsed not compiled)
therefore...
- it's executed instantly
- it's actually written in C (a programming language written in a programming language?)
for PHP see HERE
as for your last point, what if I tell you that Java is written in C++
#3
Re: Is PHP Really a Programming Language?
Posted 04 August 2007 - 11:39 AM
with java you're partly right although it's more c than c++, and you can compile java code with gcc
i wrote that question for discussion..
This post has been edited by JLeo: 04 August 2007 - 12:01 PM
#4
Re: Is PHP Really a Programming Language?
Posted 04 August 2007 - 04:01 PM
Would you say that Perl is not a programming language then? Based on your reasoning for php, it sounds like you would.
#5
Re: Is PHP Really a Programming Language?
Posted 04 August 2007 - 04:54 PM
William_Wilson, on 4 Aug, 2007 - 04:01 PM, said:
Would you say that Perl is not a programming language then? Based on your reasoning for php, it sounds like you would.
You made some real good points there
I for one would classify PHP as a "programming language" and I would Perl as well (though, like you said, some peoples definitions would say both are simply a scripting language)
#6
Re: Is PHP Really a Programming Language?
Posted 05 August 2007 - 06:37 AM
#7
Re: Is PHP Really a Programming Language?
Posted 05 August 2007 - 08:55 AM
This post has been edited by JLeo: 05 August 2007 - 08:56 AM
#8
Re: Is PHP Really a Programming Language?
Posted 05 August 2007 - 02:33 PM
JLeo, on 5 Aug, 2007 - 08:55 AM, said:
Yes, I know how JSPs and Servlets work. I've been a Java developer for many years, so no need for a lesson. Just for the record, I consider Java to be a programming language. But, when I said that someone might consider Java to be a scripting language I was not talking about it from a holistic point of view, but rather that person's perception based on contextual use. I was making a point that programming and scripting languages are meshing to the point that traditional definitions don't always apply or matter anymore.
This post has been edited by alcdotcom: 05 August 2007 - 02:34 PM
#9
Re: Is PHP Really a Programming Language?
Posted 14 August 2007 - 07:13 PM
The best distinction I can come up with is this: a scripting language is a programming language which automates tasks / generates code for a secondary language/system/framework. PHP and Perl are used to generate and interpret HTML (Perl in my experience has been used primarily for this kind of taks, and in essence it is a text-processing language). Javascript is used within a webpage to create and manipulate DOM elements. Similarly, Linux shell scripting (which is also a well-featured programming language in its own right) is used to generate command-line commands (as are DOS batch files and Windows scripting, really).
I think this definition could be refined, but does it sound right?
--serializer
This post has been edited by serializer: 14 August 2007 - 07:14 PM
#10
Re: Is PHP Really a Programming Language?
Posted 15 August 2007 - 11:40 AM
serializer, on 14 Aug, 2007 - 07:13 PM, said:
The best distinction I can come up with is this: a scripting language is a programming language which automates tasks / generates code for a secondary language/system/framework. PHP and Perl are used to generate and interpret HTML (Perl in my experience has been used primarily for this kind of taks, and in essence it is a text-processing language). Javascript is used within a webpage to create and manipulate DOM elements. Similarly, Linux shell scripting (which is also a well-featured programming language in its own right) is used to generate command-line commands (as are DOS batch files and Windows scripting, really).
I think this definition could be refined, but does it sound right?
--serializer
I'm assuming you've read my posts, so you probably already know what I think. But let me play devil's advocate for a minute just for fun. There are numerous Java technologies (Servlets, JSP, Struts, etc.) that are used to generate HTML. If one of your main criteria for a scripting language is that it generates code for a "secondary" language, then how do you explain the scenario I just mentioned? The other criterion, "automates tasks" could be said to be true of any programming language. I could write a C or Java program that performs the same tasks as a shell script or a batch file.
#11
Re: Is PHP Really a Programming Language?
Posted 15 August 2007 - 11:52 AM
1. are often not strongly typed
2. are often interpreted
3. are not often truly object-oriented (e.g. can't enforce encapsulation)
There are more and probably some exceptions to these. But I think you could use this as a guide.
This post has been edited by alcdotcom: 15 August 2007 - 11:52 AM
#12
Re: Is PHP Really a Programming Language?
Posted 15 August 2007 - 09:47 PM
alcdotcom, on 15 Aug, 2007 - 11:40 AM, said:
To that I'd say Servlets, JSP, Struts, are scripting languages/frameworks based around Java, whereas Java itself is a programming language
We could also look at the word "scripting": a script is a document that lists gives instructions one by one; a play script, lines for an actor to read one after another; a manuscript, words one after another to be read in sequence. This would ally to the weakly typed / interpreted line of thinking.
Here's an interesting link: Ousterhout's dichotomy. He divides programming lanuages into application languages vs. scripting languages.
I think a distinction based on context (i.e. the situation in which the language is being used) is more useful than a loose grouping based on the properties of the language, especially when there are so many exceptions and variations in the criterion.
Arrgh! I probably shoulda left this one well alone
--serializer
#13
Re: Is PHP Really a Programming Language?
Posted 15 August 2007 - 11:14 PM
I think if you really want to define it, I would stick with the compiled vs interpreted way, so if it is interpreted it's a scripting language (Java byte code is binary, since it is compiled, and there are even processors that implement the JVM's instructions). This means that some languages can fall into both categories: Perl can be interpreted nad compiled, too.
#14
Re: Is PHP Really a Programming Language?
Posted 16 August 2007 - 03:03 AM
serializer, on 15 Aug, 2007 - 09:47 PM, said:
A Servlet is a Java class. Struts also directly uses Java classes. These are not based "around" Java like JSP is.
serializer, on 15 Aug, 2007 - 09:47 PM, said:
Good read. Sounds like he's saying a lot of what I already said.
serializer, on 15 Aug, 2007 - 09:47 PM, said:
I made this exact point a few posts back to illustrate the blurring of programming vs. scripting languages.
#15
Re: Is PHP Really a Programming Language?
Posted 16 August 2007 - 03:09 AM
1lacca, on 15 Aug, 2007 - 11:14 PM, said:
I think it's mostly an academic discussion meant to make us think more than anything. The distinction between programming and scripting languages may not really have much relevance to your typical non-management developers. But I think that any discussion that makes us think about the jargon that we throw around has merit. And, ok, it's fun too.
This post has been edited by alcdotcom: 16 August 2007 - 03:11 AM
|
|

New Topic/Question
Reply



MultiQuote








|