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.

radiantmatrix
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

In reply to Re^3: At Last, a Useful Definition of "Scripting Language" by radiantmatrix
in thread At Last, a Useful Definition of "Scripting Language" by hardburn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.