http://www.perlmonks.org?node_id=247043


in reply to Scripting Language Biases: The Tech-Sector's New Menace?

If someone gives you that crap, ask them to define "scripting language". Then, prove that C meets that definition. (Regardless of definition, C will almost always meet it.)

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: Scripting Language Biases: The Tech-Sector's New Menace?

Replies are listed 'Best First'.
Re: Re: Scripting Language Biases: The Tech-Sector's New Menace?
by hardburn (Abbot) on Apr 01, 2003 at 05:19 UTC

    The only definition I could personally come up with for "scripting language" that C doesn't meet is "a language where a single line of code is interpreted and executed immediately". However, Perl also does not meet this definition (for that matter, neither does Python, Java, VB, or C#). AFAIK, the only true scripting languages left in common use are *nix shell scripts and the equivilents for other OSes (DOS batch scripts, etc.). Perhaps JavaScript, but I haven't dug into much JavaScript, so I don't know for sure. Intrestingly, you could might be able to fit ASM under this definition (since there is (usually) a 1:1 corrspondance between the ASM and the raw machine code).

    Defining it as "a simplistic language" might work, but that statement is so vague as to be useless as a working definition. With the right definition of "simple", you could still probably fit ASM in as a "scripting language".

    "Dynamically-typed language" might work as a definition, but I doubt you could get most programmers to go along with it. You could still probably sneak ASM in there (since you'd be manipulating the memory at a low-level, you can make it any "type" that you want). For that matter, you could probably program a few libraries to come up with a dynamically-typed version of C (in fact, I know you can, since perl itself does exactly that).

    How about "a language which can be compiled directly to machine code without an intermediary interpreter"? This is talking about the details of how the language is implemented, not with how the programmer actually uses the language. Ways exist to compile Perl without an interpeter (they might even work someday :). Ways exist to run C code through an interpreter (often used to shorten the debug cycle). Would machine code suddenly become a "scripting language" just because you ran it on an emulator instead of the actual CPU? VB can be both intrepreted or compiled. So is VB a scripting language or not?

    Can anybody come up with a more useful definition?

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

      Nope, you've just about covered the problem.

      I prefer the term "dynamic language" anyway. The type system is flexible, you've a lot of power at run time, and you've access to some type of eval.

      My point exactly! Perl may have come from the world of purely interpreted scripting languages (such as awk and sed), but it went to a place that even C++ dares not go. Because of that, it has gone beyond what most other languages can do. Perl6 will be a true 4G language, where C++ is a 3G and Java or Perl are 3.5G languages (in different ways).

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.