Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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

by pg (Canon)
on Oct 25, 2004 at 22:36 UTC ( #402375=note: print w/replies, xml ) Need Help??

in reply to At Last, a Useful Definition of "Scripting Language"

If you google "define:scripting language", it will give you a list of different definitions.

  • Some of those make sense:
    • A scripting language differentiates itself from other typical languages in that they are usually simpler to learn and use as well as not needing to be compiled. The language is interpreted at run-time so you can execuate instructions immediately.
    • A (relatively) simple programming language eg JavaScript and Visual Basic which can be used to create a script, which is a set of instructions for a computer. VBS is much favoured by virus writers seeking to exploit certain vulnerabilities in some Microsoft programs.
    • A simple programming language designed to perform special or limited tasks, sometimes associated with a particular application or function.
    • A programming language, usually suited to a particular purpose, that is easy to use and easy to learn. Scripting languages are usually designed for writing small programs like batch files. They are often loosely typed and have simple syntax to make them easy to use.
    • is an interpreted programming language that works within another application to perform tasks.
  • Several of them put a narrowed focus on web:
    • A programming language designed specifically for Web site programming. Examples include JavaScript and VBScript.
    • A specialized language used to create scripts that, when inserted into a Web page, control various elements of the page, such as the user interface, styles, and HTML markup.
  • Some are way too general :-)
    • The programming language in which a script is written.

Any way, as I always believed, Perl is not the kind of traditional scripting language.

  • Comment on Re: At Last, a Useful Definition of "Scripting Language"

Replies are listed 'Best First'.
Re^2: At Last, a Useful Definition of "Scripting Language"
by apotheon (Deacon) on Oct 26, 2004 at 07:28 UTC
    Rather than requiring a language to be "interpreted" to call it a scripting language, I think it would be more accurate to say that scripting languages are not precompiled. That allows both interpreted and compile-at-runtime languages to qualify.

    The difference, for purposes of defining it as a "scripting language" (or not), would be in whether or not it is still in a source-code format right up to the point where you run the script (and whether or not it is still source code when it's done running). This in turn creates a set of characteristics for usability that are attached to scripting languages and not precompiled languages. It is in truth these usability characteristics that makes the difference, but those characteristics depend on whether or not your code is precompiled.

    From within the limited environment of an IDE like Microsoft's Visual C++, C code is actually sort of a "scripting" language, in that it is source code right up to the moment you run it, and still source code when you're done. Only when you compile the binary and exit Visual C++ does it become a non-scripting programming language.

    This does tend to fit with the idea that a scripting language is what you use to "get things done", of course: scripting languages, because they can be created and/or modified very easily on the fly, are used to do things, and non-scripting programming languages are used to make things.

    I see nothing to deride in either term. Each has its uses. Neither of them is necessarily limited within its range, and both are quite limited outside of their respective ranges. The only derogatory thing worth saying in regards to either might appropriately be applied to the programmer if he or she uses the wrong tool for the job. If you know both PHP and C++, for instance, and try to use PHP to write applications and C++ to write includes for a web page, you're probably doing something drastically wrong.

    - apotheon
    CopyWrite Chad Perrin
      "From within the limited environment of an IDE like Microsoft's Visual C++, C code is actually sort of a "scripting" language,"

      I really like this point you made. Once you pointed it out, it makes great sense to me.

      In this sense, pre-c is also kind of mixture of real c code and mini-scripting language. In pre-c source code, you can directly embed SQL statement, but before it goes through the c compiler, it will first go through a pre-c "compiler", which will convert SQL statements to c code.

      By the way, I like what pre-c allows me to do, as I don't need to concate a series of ugly string into a SQL statement, which is not visually clear and pleasant to me.

      scripting languages, because they can be created and/or modified very easily on the fly, are used to do things, and non-scripting programming languages are used to make things.

      This seems to get to the heart of it. But, does this mean you are unable to identify a scripting language without examining how its used?

      This also implies a different development methodology for scripting than for making things.

        I think you're right in both suppositions. Keep in mind that "scripting" is a verb that has been appropriated for use as an adjective here: it describes what one does with the language. As such, how it is used is central to whether or not that label (scripting language) is applicable. That's my take, anyway.

        One need not necessarily use a different development methodology when scripting as opposed to doing more "permanent" programming, but it would probably behoove you to allow differences in approach for these differing tasks. The differing methodologies are indeed implied (at least in tendency and efficiency for the task), to some extent, without being "laws", so to speak.

        - apotheon
        CopyWrite Chad Perrin

Log In?

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

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

    Results (41 votes). Check out past polls.