For some languages it's pretty uncontroversial, e.g. Java and C are not scripting languages, while the Unix shell language is a scripting language.
I'd say that scripting languages are in any case a subset of programming languages, i.e. all scripting languages are programming languages.
I've read at many places that Ruby can do what Java can do
Well, that goes into computer science theory, and namely Turing completeness. Principally, just about all commonly used programming languages can do the same things. As that article states, it's actually hard to find a language that can't do some of the things Turing-complete languages can do, and is still somewhat interesting. In this sense, Ruby and Java are the same.
But just because the same things are possible to do, it doesn't mean they're easy or efficient to do. Some languages are much better at certain tasks than other languages.
Originally posted by Shiv Sidhaarth:
The use of interpreter rather than compiler is the major difference between a scripting language and programming language.
No. Perl and TCL -both generally regarded as scripting languages- use compilers.
Java uses Complier.
At runtime Java uses both an interpreter and a compiler.
A more distinctive sign of a scripting language used to be that no native code is generated permanently, meaning stored on disk. In that sense, Perl and TCL are scripting languages, because the native code they generate exists during runtime only. But of course the same is true for Java, so that's not a distinguishing feature.
As an aside, the Java runtime is principally an interpreter; the native code compiler is optional (although generally used, of course).
I like Lasse's definition of a scripting language not needing to define methods and classes. There are languages I would classify as programming (not scripting) languages that do not require methods either, though - Scheme comes to mind, and thus probably Lisp.
[ June 11, 2008: Message edited by: Ulf Dittmer ]
Originally posted by sreerupa basu:
Ruby is an object oriented scripting language which is used to write programs. And... a scripting language is a form of programming language which do not need a compiler. It is directly interpreted at runtime, after hitting run.
The compiler argument is way off base. Languages that are considered to be scripting languages are often used for the back end of web apps(Perl, Python, Ruby, PHP). However, You can use C instead of say Perl. Does that make C a scripting language?
Furthermore, it is not impossible to write a C interpreter. Would that make C a scripting language?
IMO, JS, ActionScript, etc are scripting languages. C, C++, Java, Ruby, Perl, etc are programming languages, even though some are used often as scripting languages.
By any meaningful definition of scripting and programming language it can be considered both.
It is like asking what is and what isn't Web 2.0? It is a term with no real value.
[ June 11, 2008: Message edited by: Rusty Shackleford ]