What is a scripting language?

Discussion in 'OT Technology' started by Peyomp, Oct 7, 2005.

  1. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    So, I know a C++ programmer. I've been doing Java lately. He's from a CE background, and swears he will never work in a 'scripting language.' This pisses me off. Its one of those, 'low level is better' whoring things. It is my contention that Java is not a scripting language. But... since php, perl, etc. actually interpret code and compile it into bytecode... and you can do this ahead of time... and they all manage memory for you... its hard to come up with a definition that works... that makes Java not a scripting langauge.

    Anyone?
     
  2. MovieMan84

    MovieMan84 Here we go

    Joined:
    Sep 10, 2002
    Messages:
    4,374
    Likes Received:
    0
    Location:
    Redmond
    http://en.wikipedia.org/wiki/Scripting_language

    Java is not typically a scripting language because scripting is used to automate tasks of a computer (sort of like writing a macro). Java can be implemented as a scripting language, but it isn't by itself. JavaScript is a scripting language and BeanShell is a scripting language for Java.

    Also, your friend is a douche. Most good computer engineers end up writing little scripts to make their lives easier.
     
  3. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Ok... but things get a little confusing considering the types of things that can be built in perl, PHP, etc. The wiki is pretty good though. Maybe I shoulda found that myself.

    And yeah, I think he's a douche too.

     
  4. R-Type

    R-Type The Bydo Empire must die!

    Joined:
    Aug 2, 2002
    Messages:
    1,049
    Likes Received:
    0
    Location:
    CT
    Well, using exec() type calls, you could write 'scripts' in C too. The real dividing lines are interpreted vs compiled code, and how many api layers your logic has to run through, vs how many lines of code you have to type before any work is done. Current 'interpreted' languages like perl, python, and php, still have an overhead runtime that interfaces the bytecode (precompiled or not) with system level C calls, while java runs its code through a complete VM (even slower but generally quite portable). This overhead slows things up a bit and takes more memory. In contrast, C binaries are already compiled down to hardware level microcode, allowing the logic to execute faster. However, the benefit of these languages is that they have functionality that allows for rapid development of useful logic. In contrast, having to write every single script in C in order to do anything useful would be a real drag.

    It all depends on your priorities. I'm all for scripting/interpreted stuff when rapid dev is most important and/or high performance isn't required (single use, specialized functionality). However, when people start doing stupid things like writing bittorrent clients in interpreted languages (azureus+java wtf??), that aggravates me. They're slow and they eat tons of CPU and ram. yeah, I guess the geek-factor is high, but pragmatically I should be able to track more than 6 torrents at once without pegging a P3 850.
     
  5. col_panic

    col_panic calm like a bomb Moderator

    Joined:
    Sep 19, 2003
    Messages:
    188,160
    Likes Received:
    0
    Location:
    winter haven, fl
    exactly. i draw the line at when it is compiled: precompiled = programming language. runtime compiling = scripting language.

    but your friend is still a douche
     
  6. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    According to teh wiki, its about intent of design. How you use the langauge. What its for.

    Java uses Just In Time compiling, so it is runtime compiled from the JVM into machine code... but its clearly an application language, and not a scripting language. Other languages like perl started out as scripting languages, but are now full-featured application langauges. And other things like javascript, bash, etc. are and continue to be scripting langauges.

    Basically, as technology has advanced, the term has become muddled and antiquated.

    I still felt insulted :) After all, its not Visual fucking Basic.
     
  7. R-Type

    R-Type The Bydo Empire must die!

    Joined:
    Aug 2, 2002
    Messages:
    1,049
    Likes Received:
    0
    Location:
    CT
    It's not just about what they're used for. There are intrinsic differences between the execution environments of C/C++/asm and 'managed' code like java. C is essentially a 'scripting language' for asm, but you're still managing the target hardware at a very basic level. For example, you won't be seeing OSes written in java anytime soon..at least ones which run on hardware. I guess it's possible to write a compiler which would take java code and translate it to machine language instead of bytecode, but I suspect some modifications would have to be made to the syntax to allow for resource management. This applies to the ohter interpreted languages as well.

    Feel free to correct me where I'm wrong, but this has been my understanding of it :p.
     

Share This Page