Thread: What's the Difference Between a Programming Language and a Scripting Language?

  1. #16
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    heh... I forgot about that... I haven't used Perl in quite a while, and forgot that it's a compiled language... but what about JavaScript?
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  2. #17
    Banned
    Join Date
    Jun 2005
    Posts
    594
    Let just agree that its a compiled langauge the code itself is used
    to create an application, and let call it a scripting language
    when something else is needed to do anything with the langauge.

    So if you compile VB then its a compiled language at that point
    and time, if you use it as a script, then it a script for
    that point in time.

    I would say that all langauge fall into both categorys,
    because a interpretor can be written for all languages
    and a compiler could be written for all langauges.

    Granted some of the lagnauge wouldnt be as powerful
    as others. But i think this topic is pointless if unless you look
    at it in black in white. Because there always exceptions.


    So incase i lost anyone, every language is a compiled language
    and a scripting language (has the ability to be anyways).

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by major_small
    heh... I forgot about that... I haven't used Perl in quite a while, and forgot that it's a compiled language... but what about JavaScript?
    The Rhino JavaScript engine compiles scripts to Java bytecode.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by CornedBee
    The Rhino JavaScript engine compiles scripts to Java bytecode.
    I mean under normal conditions.

    I agree with wikipedia and ILoveVectors... all languages can be both a compiled and interpreted language, and the line is fading as we move on... eventually, it won't make sense to seperate the two groups.

    as ILV said, when you compile it, it's a compiled language. when you interpret it, it's an interpreted language. if you do both, then it's both. it depends on the way the language is used, not the language.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  5. #20
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by major_small
    I mean under normal conditions.
    What ARE normal conditions? There's quite a lot of Java applications scriptable using the Rhino engine. There's also quite a few apps using the SeaMonkey engine, which is purely interpreting. Which of them is normal?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #21
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    wow... you're reading into this way too much...

    JavaScript was made to be a script. hence the name. therefore under 'normal' conditions (you write the script into HTML and let a browser take care of it), it's an interpreted language.

    sheesh...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  7. #22
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    What I'm trying to make clear is that there is no definite correlation between a language being for scripts and being interpreted.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #23
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by CornedBee
    What I'm trying to make clear is that there is no definite correlation between a language being for scripts and being interpreted.
    that's pretty much exactly what I said in my next-to-last post...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  9. #24
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    Does is answer the question:


    To compile your first java application, enter the following (assuming that the java directory is in your path) :

    javac myfirstjavaprog.java

    Javac is a compiler included with Sun's JDK. It translates the source file into Java byte-codes. While Java is an interpreted language, it is reduced into byte-codes which are interpreted by a Java virtual machine (in much the same way assembly language / machine code for older computing systems can be executed by emulator software). The compiler stores these byte-codes in a ' .class ' file. To execute the application, the Java interpreter will run this ' .class ' file.

    java myfirstjavaprog

    If everything goes according to plan, the message "Hello World!", followed by a newline should appear on your terminal/screen. You've just compiled and executed your first application.

    How about this

    http://www.artima.com/underthehood/bytecode.html

    http://cgibin.erols.com/ziring/cgi-b...p.pl?_key=Java

    Java is typically compiled to platform-independent byte-codes. These byte-codes must be interpreted by a Java Virtual Machine (JVM), which may choose to compile the byte-codes further into native machine instructions. There is a strict definition of the Java byte-code file format, the .class file format, which ensures portability of compiled Java classes
    Last edited by Mister C; 07-15-2005 at 04:51 PM.
    Mr. C: Author and Instructor

Popular pages Recent additions subscribe to a feed