Is javascript actually a "programming language"

Discussion in 'Software' started by Unbanable, Sep 10, 2008.

  1. Unbanable

    Unbanable Specialist

    In your opinion should javascript be considered an actual programming language?

    I've always thought of it to be a "scripting language" different from a programming language, similar to the way HTML is a "markup language" which is quite different from a programming language, but I could be wrong, and would like to know your thoughts.
     
  2. da chicken

    da chicken MajorGeek

    It's entirely semantics.

    To me, any statement which is an instruction that a computer can interpret, decode, and execute is a program. Thus, C, JavaScript, HTML, and SQL are all programming languages.

    Scripting languages are not weaker than "full" programming languages. They're just designed to do different tasks. Perl, for example, is just a scripting language but has been used for extremely complex tasks. Linux shell scripts (particularly for things like automake) contain immensely complex tasks which would be ridiculously complex in a non-scripting language to perform. "Just" a scripting language is not a fair assessment.

    The primary difference between, say, HTML and SQL and C or JavaScript is that the latter are procedural languages (meaning they tell the computer how to do every step in exact detail) and the former are declarative languages (meaning you tell the computer what you want and it figures out the best way to do it).

    C is compiled, binary, strictly typed, procedural language
    JavaScript is interpreted, weakly typed, procedural language
    HTML is interpreted, weakly typed, declarative language
    SQL is interpreted, strongly typed declarative language
     
  3. Unbanable

    Unbanable Specialist

  4. PC-XT

    PC-XT Master Sergeant

    I often work out ideas in JavaScript or BASIC, which are interpreted scripts, before translating to Java or C, which are compiled. I also do the reverse. Scripts do things slower, but can do some things that compiled languages can't very well, like being loosely typed or using eval or equivalent to run straight code that it generated itself. Scripts are sometimes the only way to do something, such as when JavaScript was the only way to affect a Web Page. (Though Java and other plugins are also used now.) Machine code is kind of like a script, even though it is the result of compiling, because it scripts the CPU, which actually does the calculations. It can generate and run straight machine code. It generally doesn't keep track of types for simple data forms, but works with bits and bytes.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds