Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a "real" programming language? [closed]

Recently a teacher said "PHP isn't a real programming language", but only gave, in my opinion, weak justification:

  • It's not compiled.
  • It's scripted.
  • It doesn't run on every platform.

Is PHP not considered a "real" programming language? What is a "real" programming language? Must a language be compiled to be taken seriously?

Background

I did an induction lesson into my A-Level Computing Class in school two days ago – we're using Java for the first year of the course. I'm unfamiliar with Java but have a pretty good grasp on general programming fundamentals (variables, functions, object-orientation, loops, etc.).

Our first task the teacher ran through ridiculously fast. She didn't bother to explain any of the concepts, how they work, or what you would realistically use them for, and seemed to take great pleasure in watching most of the students (who were, on the whole, new to programming) squirm in their seats at not having the vaguest idea what she was on about. In hindsight, I reckon she went through it incredibly quickly to see who could really "handle" taking Computing A-Level, since students still have a chance to change their subjects before September begins.

The first and only task was to write a Java command-line application to convert binary to denary (decimal). We had a two-hour taster session to do this, and after explanation how the binary system works we had to begin, despite, on the whole, nobody really having the foggiest idea where to begin. After an hour some were further than others, but nobody had really achieved anything significant. The teacher herself became so confused she called in another teacher from next door. He came round to help people and see where to go next.

Without bragging, I probably did have the most experience in the class and had gotten the furthest in the exercise. He asked me if I'd had any previous experience; I said yes, particularly in PHP, and jokingly commented that I could write something to convert binary to denary in just a few lines of PHP, whilst the Java application was rapidly growing into several screens of code.

He replied, "PHP isn't a real programming language!"...! After some discussion, he gave the three reasons above. However, I pointed out you can run PHP on any platform that runs Apache, but I don't think he really knows what Apache is and was having none of that!

like image 237
Jack Avatar asked Jul 11 '10 08:07

Jack


People also ask

What is real programming language?

A programming language that meets some minimum standard of practical usability for writing 'real-world' software. Examples: CeeLanguage, CeePlusPlus, CeeSharp, JavaLanguage, SmalltalkLanguage, CommonLisp, PythonLanguage, PerlLanguage, RubyLanguage, RpgLanguage, CobolLanguage, FortranLanguage.

Is there a closed source programming language?

A language cannot be closed-source. Its compiler and run-time libraries can be closed-source. A formal grammar of a language can be kept as a secret though and be legally protected (NDAs, etc.) and fees collected for usage.

Why Python is not a real programming language?

A Python script isn't compiled first and then executed. Instead, it compiles every time you execute it, so any coding error manifests itself at runtime. This leads to poor performance, time consumption, and the need for a lot of tests. Like, a lot of tests.

Is Python a real programming language?

Python is a programming language. It is an object-oriented programming language with lots of features which do support in development of web applications as well.


1 Answers

First we need to know what a programming language is. At its minimum, a programming language is something that is read by the computer and instructs it to perform certain operations. Many people would also expect a general purpose programming language to be Turing complete. However there could be situations where a domain-specific language isn't Turing complete but is still a useful programming language for that specific domain. Programming languages can be compiled or interpreted, and they could run on many platforms or just one specific one. Different needs require different programming languages. Clearly PHP is a programming language.

My definition of "real" programming language would be any programming language that has at least one practical usage in the real world. This is opposed to an esoteric programming language which typically has no practical usage. Since PHP is used widely to solve real problems it easily meets this requirement for being a real programming language, although it is arguably not a particularly beautiful language.

PHP is a pragmatic language. It was created out of a specific need to be able to quickly make web pages (the name originally stood for Personal Home Pages) and the language was extended as required. Since there was no theoretical background or strong design principles driving its creation (there isn't even a formal specification of the language) it is less clean than many other more modern languages. Features like correct handling of foreign characters / unicode characters are obviously added on afterwards and not cleanly integrated with the rest of the language. This untidiness and lack of theoretical rigour causes many people (especially academics) to dislike the language and this may be part of the reason why your teacher doesn't regard PHP as "real" language.

However PHP is good at what it was designed for and many sites use it, even very large sites like Facebook, Yahoo! and Wikipedia.

like image 82
Mark Byers Avatar answered Sep 29 '22 15:09

Mark Byers