in reply to Re^2: At Last, a Useful Definition of "Scripting Language"
in thread At Last, a Useful Definition of "Scripting Language"

That might be a logically-consistent definition, but it isn't a useful one. I can write a program that will take C code and interpret it on the fly. Would C then be a scripting language?
That's why that definition is useful, because there is overlap, and because it defines a language based on how it can be used. In the case you cite, you'd have an environment (your interpreter) in which C was a scripting language. Just like in csh. C can be a scripting language in some environments, and a compiled language in others.

Similarly, Perl can be a scripting language or an interpreted language, depending on how it is used.

Now, a language that is meant to be interpreted is often optimized for running in an interpreter, and likewise for compiled langs, but it is still possible to implement it the other way.
Exactly. The problem is that languages might have been destined for one type of use, but evolve into another type of use. Imagine a language 'X': it is designed by its original architechts to be a scripted language. Someone finds it very useful, but wants to be able to distribute the language in machine-code form so that the interpreter need not be shipped with the product; so, they build a compiler for 'X'.

Now, 'X' is a scripting language -- it was clearly designed to be that way. However, it is also, now, a compiled language.

So I reject that definition on the grounds that it doesn't make a smeg of practical difference.
Outside of academia, languages need to be useful above all else. Useful languages eventually get modified and built upon until they become "all things to all people". Creating arbitrary lines and saying "this language is a scripting language because $arbitrary_reason" will never make a whit of difference.

The only useful description of a language is one that gives you an idea of how it can be used. If you use my definitions, saying "Perl is both a scripted and interpreted language" actually conveys useful information. It tells me that I can run Perl programs as scripts or as bytecode-compiled binaries. That gives me a vague idea of what Perl is capable of. It gives me a clue that Perl will require an interpreter of some kind; and, that means it will have certain pros and cons.

require General::Disclaimer;
"Users are evil. All users are evil. Do not trust them. Perl specifically offers the -T switch because it knows users are evil." - japhy
  • Comment on Re^3: At Last, a Useful Definition of "Scripting Language"