Jump to content

PHP a toy language >:(


cowfish

Recommended Posts

Hello,

 

I have to do a large gorup project at University. There are many projects, some in C++ and other in Java. They range from computer games to small software driven robotic aircraft to desktop software. However, being interested in web applications (and having no education in robotics), I got drawn to the web development projects, which are mainly done in PHP.

 

I express my interest, but another student waves PHP off as a joke and a toy language that any unskilled programmer can use. If you are wondering he is a C++ programmer. Anyway I was very taken aback by that. Actually I was a bit pissed off by that comment as I see PHP as my "native language". Though I do use C++ and Java as well. Also, despite a simpler syntax than C++, I think the syntax has nothing to do with programming skills e.g. learning how to use OOP correctly and using patterns correctly etc etc.

 

Do you think he was being reasonable or just egotistical?

 

 

 

 

Link to comment
Share on other sites

I have had similar arguments (discussions?) with people. Generally they are C++ or C# coders. But when I ask them to explain to me why their language is better than PHP they simply can't.

 

It's just fanboys. A bit like the Xbox360 versus PS3 debate!

Link to comment
Share on other sites

I agree its an ego thing..

 

I guess PHP is "easier" to learn then C++ but it still takes skill to master and deliver good,readable,functional code.

 

I think its personal preference - i hated C++ / I love to code php - who cares what others think?

 

Dave

 

Link to comment
Share on other sites

You have got to realize that someone in collage has only seen about 0.05% of what real life programming and programming languages are about. If someone with that amount of experience is telling you that one language is better than another, you need to consider the source. His statements are based on a lack of knowledge, with a huge dose of ego thrown in.

Link to comment
Share on other sites

Well I have to say, PHP does not have quite the power of C++, or C#/Java or what have you.. but is by no means a 'toy language'..  I actually enjoy coding in multiple languages, because each has it's own uses and strengths/weaknesses.

 

That guy is obviously a tool.

 

:)

Link to comment
Share on other sites

Personally I don't see how you can compare the two.  They work in completely different environments, and their purposes and totally different.

 

From what I can see PHP is there primarily to provide support for web based applications, and websites as a whole.  Whereas C/C++/C# is there to create executable applications.  There's no way you can implement C++ in to your website if you're wanting to run a web based forum (not that I've seen!).  So this is when PHP can be used.

Link to comment
Share on other sites

Personally I don't see how you can compare the two.  They work in completely different environments, and their purposes and totally different.

 

From what I can see PHP is there primarily to provide support for web based applications, and websites as a whole.  Whereas C/C++/C# is there to create executable applications.  There's no way you can implement C++ in to your website if you're wanting to run a web based forum (not that I've seen!).  So this is when PHP can be used.

 

I have to disagree... When php is parsed it is converted to commands in C++ and then executed. So in essence C++ is the core.

 

If this guy gave me #@*& about PHP I would probably pop one in his face.

Link to comment
Share on other sites

I have to disagree... When php is parsed it is converted to commands in C++ and then executed. So in essence C++ is the core.

 

This is not true. PHP is 'compiled' into so called 'opcodes', which are executed by the Zend engine, which is written in C. Apparently some extensions are written in C++, but C++ is definitely not 'at the core'.

Link to comment
Share on other sites

If this guy gave me #@*& about PHP I would probably pop one in his face.

You always seem hostile, try a hot bath or jacuzzi sometime?

 

As far as the topic goes, your classmate is basically demonstrating that they don't understand some languages are more applicable for certain tasks than others.  Truthfully, C++ is more powerful because anything you can do in PHP you can also do in C++, with the reverse not necessarily being true.  I challenge anyone who says otherwise to write a program that controls a space shuttle navigation system in PHP.  If it came down to choosing one language as "the best of them all," I'd say it's C, because it's even more widely supported than C++.

 

That said, it doesn't mean PHP is a beginner's language or a "toy."  Let's say the average price for creating a web site is $4,000 USD.  If you're making your sites in PHP and your friend is making his in C++, there's a good chance you can produce them faster than he can.  So he can e-mail you and taunt you that PHP is a "toy" and you can respond when you get back from your vacation.  ;)

 

Visual Basic, for almost all intents and purposes, is a horrible programming language.  But even it has a niche area in rapid application development where it works very well.

 

Putting it another way, just because I can steer my car with shoes on my hand doesn't mean it's a good idea.  Use the proper tool for the job.

Link to comment
Share on other sites

Depends on the application you are gearing for.

 

Although u can do the same thing in C/C++.

The question comes in, how to implement it into a web server.

 

 

DB Access, and other libraries.

 

PHP is geared for rapid web development, under most environments.

 

 

C/C++ u wud have to gather/build these libraries. As well as compile/test under different environments if you wanted to be cross platform.

 

 

So Development language is dependant what the application is geared for.

 

 

These arguments of This language is better than that language is left for those who limit their capabilities to one realm.

 

 

So go ahead, learn some PHP, learn some C++, Basic, Python, Java, Ruby, Lua, Rebol and the hundred other languages that are available, and enjoy learning :)

Link to comment
Share on other sites

I always wonder what people are looking at when they refer to a language being "powerfull".

The number of built-in function ( I hope not)?

The type of data access, SQL, binary files, network sockets, etc?

The processing efficiency?

 

I have a few PHP scripts that parse thousands of text files and directory listings (600-20000 files) in as short as a couple seconds.

One of these days I want to write the equivalent in C, for a side-by-side.

 

To the original point, I don't see why anybody would have a problem with a language that can literally show results in minutes. For data parsing, I would put PHP up against any other language complied or interpreted (development time included). That doesn't mean it will win them all, but I think it would show that PHP is no "toy".

 

Full disclosure: it may come as a shock to some that I am not formally educated in programming.

(in other words I may just be talking out of the 'other' end)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.