infolock wrote:Hello world is not an example that shows you the powers of a language, it is simply a method of allowing you to see a language in action. Not to show the benefits of it. So personally, I don't see the point in that example. You can make that with anything, but all because you do, doesn't make it prove any point.
Its because we see the main goal of computer science differently. You see it as something involving the language, the machine, and so forth.
I see it as the science behind making computers perform tasks. With that difference in goals, comes a huge difference in opinions about what everything else means. Nothing wrong with that, we just have different opinions.
infolock wrote:
I'm talking about actually writing code to tell the computer "hey, I want this bit of data from the serial port any time data is sent". Can you do this with php ? no.
Yes, you can:
PECL wrote:PHP supports the direct io functions as described in the Posix Standard (Section 6) for performing I/O functions at a lower level than the C-Language stream I/O functions (fopen(), fread(),..). The use of the DIO functions should be considered only when direct control of a device is needed.
http://pecl.php.net/package/dio
Any other criteria? PHP *is* a programming language.
infolock wrote:
Why not? Because it cannot communicate with the machine at that level. You can tell it to open the port yet, but you can NOT tell it to monitor that port.
With the dio extension, yes, you can.
infolock wrote:wrong again. PHP cannot do that, HTML does that. Javascript does that. PHP sends a REQUEST to the interpreter wanting an action to take place, and that interpreter (the php engine) completes the task.
You are assuming the presence of HTML or javascript. In a winbinded php app, its a full-out native window, complete with pop up windows, dialog boxes, and common UI elements. Alternatively, you can run php on the commandline. You can make a php-shell even.
PHP doesn't need html or javascript to produce output, or gather a response.
infolock wrote:again, this is where we differ. Go to aacollege proffessor of CS and tell him that. He'll lecture you for about 3 hours of why what you are led to believe is completely wrong.
Funny you should mention that.. I've been discussing the issue with a friend who has plenty of credentials, and he's puzzled at your criteria for a "programming language".
Argue your own position, or agree to disagree.
infolock wrote:I do not argue that, but again, PHP cannot make a computer do a task.
What task? Serial port access? Input/output? Window manipulation? Database access?
Each time I've asked for specifics, the specifics have shown the opposite. PHP can be compiled. PHP can access the serial port. PHP can access databases. PHP can interact with the user.
PHP can make a computer do a task!
infolock wrote:I don't know man. If I can't explain this any more clear, I think both of us need to go back and retake the CS degree. Because I think I can't explain it like I should, and you can't seem to understand this simple definition of differences between a script and a program. =\ No offense intended, I just can't debate about it anymore than I already have =\
No offense taken. Your arguments are simply inconsistent.
You claim that the goal of CS is to teach about a language, when in fact most CS degrees want you to be exposed to at least two. You claim that the goal is to teach about machines, but many CS degrees once used Java - which is explicitly machine-independent. You then claim that you agree that the goal is to teach students how to get a computer to do a task, but then argue over which tasks meet your criteria of a "programming" language.
The first criteria you propose is that it has a compiler. PHP has multiple, and can in fact produce machine-native code as a result. So thats out.
The second criteria you propose is that it is not an "industry standard", but when I give plenty of reasons why PHP is, you give no definition in opposition. So thats out.
The third criteria you propose is that the language has to have direct hardware access. PHP can in fact do that too, eliminating that criteria.
Your underlying argument that because PHP has to rely on other layers it isnt a programming language is similarly flawed - every language you've cited: Pascal, Basic, cobol, C, C++, Java. All of them rely on other layers! Whether its a just-in-time compiler, a standard compiler, an OS, or a posix interface (provided by an OS), NONE of those languages actually operate purely independent of any other layer. So PHP is "just like them too". They all rely on other systems to make a computer perform a task.
infolock wrote:
Well, let me put it in better terms. If you refuse to accept what I'm telling you about PHP being a scripting language, about PHP not being able to have a computer to perform a task, well, that's fine.
We don't agree on that, you are right. You've given no criteria that sets PHP apart from any of the languages you've specified as a "real" programming language.
infolock wrote:If ya can't take my word for it, at least do some research on this subject. 20 minutes of reading will do more good than I have with these 3 pages
I'm quite knowledgable about computer science, programming, and the methodologies.
I've asked specific questions about your criteria, and found flaws in every argument you've made, and all you've done is repeated yourself, and changed your criteria instead of defending your arguments with logic or facts. (Worse, then you make a personal attack, implying that I've done no research on the subject).
So, if you want to continue discussing it, give the criteria determining whether a language is "real" in your definition, so we can disprove your accusation that PHP isnt a real programming language.
Then state clearly what you think the purpose of CS is, and we can go forward. Stick to facts and logic (and leave the personal attacks out), or move on.
I'm always willing to expand my mind and attempt to understand another position. As long as it is based on facts, and logic, and not simply repetition. But personally, I'm with you on your earlier comment - I think we completely disagree, and there is no middle ground, so we should just move on.