Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: At Last, a Useful Definition of "Scripting Language"

by radiantmatrix (Parson)
on Oct 27, 2004 at 20:23 UTC ( #403141=note: print w/replies, xml ) Need Help??

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"

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403141]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2023-12-11 11:33 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.