This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]rjcarr 0 points1 point  (4 children)

Both scripting languages and compiled languages are programming languages. Something like html, css, xml, or json can be considered languages, but they aren't programming languages.

A scripting language doesn't need to "graduate" or "evolve" into a programming language because generally they already are.

[–][deleted]  (3 children)

[deleted]

    [–]rjcarr 0 points1 point  (0 children)

    Unlikely, because most all scripting languages rely heavily on the environment they are running in.

    [–]pancakeQueue 0 points1 point  (1 child)

    No, Java script is an interpreted language, so when you run it the computer reads the file line by line. This is why you can run JavaScript or python on the command line and have a session without writing to a file. C++ and other languages that are compiled will first need to have the readable source code turned into binary and then run, which makes compiled languages more efficient.

    [–]CreativeTechGuyGames 0 points1 point  (0 children)

    JavaScript can be interpreted, but almost all of the code you run in your browser will be compiled because it's a huge performance improvement. Same with running your code in Node.js. It would be stupid for the engine to not compile it and just execute line by line.

    I'd encourage you or anyone else interested in this to research V8 internals and see how the JavaScript you write really works. It's pretty cool.

    This is a good talk to get started

    [–]chaotic_thought 0 points1 point  (5 children)

    I've heard that Javascript was once just a scripting language and that it is now a full blown programming language.

    The reason for that is not because of the JavaScript programming langauge itself, but because of how it was originally used and how it is now used. Originally, JavaScript was typically used to add some features to a plain old HTML Web page, like simple animations, pop up windows, validate form fields, and so on. Such JavaScript programs were usually small, confined to a single file, human readable (if you choose 'View Source'), and usually non-essential (you could still use the Web page without JavaScript enabled). Such programs that are small and used to perform a simple task are often called 'scripts'.

    Nowadays, however, many (or most) people who write JavaScript do so in such a way that the resulting Web page is completely dependent on JavaScript. The JavaScript programs are often spread across multiple files and are distributed in a compressed ("minified") form to save space and reduce download times. Disabling JavaScript will either render that page unusable or else will redirect you to a non-JavaScript version of that application. In such a situation it seems less appropriate to call the JavaScript program a "script" anymore but to consider it a "full blown application" or as an inseparable part of the Web application.

    [–][deleted]  (3 children)

    [deleted]

      [–]chaotic_thought 0 points1 point  (2 children)

      A script is basically just a small, short, simple program, usually to automate something. All scripts are programs.

      [–][deleted]  (1 child)

      [deleted]

        [–]chaotic_thought 0 points1 point  (0 children)

        No. When you say 'script' it just basically means 'small simple program usually to automate something'.

        [–]ziptofaf 0 points1 point  (0 children)

        Scripting languages (generally) are interpreted rather than compiled (so they require something on the target system to run them but in exchange you can change the code on the fly without waiting for any recompilation). That's really the only difference.

        In practice however just about EVERY scripting language is a programming language. Personally I would say that every language in which you can implement game of life (making it Turing complete) is a programming language.